Subject: Re: git instaweb - share all project files

From: Jakub Narębski <[email-masked]>
Date: Sun, 14 Apr 2013 12:35:37 +0200

W dniu 10.04.2013 19:03, Jakub Narębski pisze:
> W dniu 07.04.2013 05:02, Trenton D. Adams pisze:
> 
>> On that first page that shows up, it shows the .git folder.  It would
>> be kind of nice if it shared out both the git repo and the actual
>> current project files.  I frequently have stuff I'd like to see in a
>> web browser, and even requires one (i.e. Navigating to
>> file:///home/blah/blah doesn't work; ajax requests for example)
> 
> There are a few possible solutions, from simplest to most complicated:
[...]

> 2. In the web server configuration generated by git-instaweb, perhaps
>    as an option, add serving of worktree (with mod_autoindex aka.
>    'Options +Indexes' for Apache2, and equivalent solutions for *all*
>    other supported web servers: lighttpd, mongoose, plack, webrick).
> 
>    This may require some fiddling with URI rewriting, or change of
>    gitweb URI, to be able to have both worktree index and gitweb
>    script (gitweb is now under '/'), so it should probably be protected
>    by an option to git-instaweb.

The trouble (besides writing the same code for 5 web servers) is that
you have to make web server detect whether you want to access workdir or
gitweb from URL alone...

...and still you wouldn't have nice UI integration.

> 3. Add proper support to gitweb: add 'worktree' action (similar to
>    'tree' action / view).  Probably needs to be made somewhat
>    configurable (and of course enabled in git-instaweb).

I wonder if this should be solved via new actions, for example
'worktree' and 'file' (which could also be a solution to problem in 2.)
via URI rewriting), or via new symbolic "hash" name, for example
'WORKTREE' (like 'HEAD').

Hmmm... while at it, perhaps we can add browsing of INDEX version of files?

-- 
Jakub Narębski