On Sun, Apr 18, 2010 at 21:56 +0200, Petr Baudis wrote:
For that you would need editing file / editing contents action, but
this is explicitely excluded in current version of Pavan's proposal :-(
It would require using 'git hash-object -t blob -w --stdin' (from body
submitted via POST from textarea) plus 'git update-index --cacheinfo'.
There is however complication that you would need to do open2/open3
because git-hash-object would require bidirectional communication unless
you would use temporary file (command_bidi_pipe in Git.pm, untested).
Let's check what gitweb/INSTALL says currently
$ make prefix=/usr gitweb ;# as yourself
# cp gitweb/git* /var/www/cgi-bin/ ;# as root
WTF with 'gitweb/git*' glob?
Ah, later there is "Build example", which is
- To install gitweb to /var/www/cgi-bin/gitweb/ when git wrapper
is installed at /usr/local/bin/git and the repositories (projects)
we want to display are under /home/local/scm, you can do
make GITWEB_PROJECTROOT="/home/local/scm" \
GITWEB_JS="/gitweb/gitweb.js" \
GITWEB_CSS="/gitweb/gitweb.css" \
GITWEB_LOGO="/gitweb/git-logo.png" \
GITWEB_FAVICON="/gitweb/git-favicon.png" \
bindir=/usr/local/bin \
gitweb
cp -fv ~/git/gitweb/gitweb.{cgi,js,css} \
~/git/gitweb/git-{favicon,logo}.png \
/var/www/cgi-bin/gitweb/
WTF with '~/git/gitweb'... ehh, that one is mine, I guess...
So additional step would be
cp -fvR gitweb/lib /var/www/cgi-bin/ ;# as root
I hope that we could make installing gitweb as easy as
make webscriptdir=/var/www/cgi-bin/ \
gitweb-install
or in more complicated case (gitweb modules not installed in cgi-bin)
make webscriptdir=/var/www/cgi-bin/gitweb \
GITWEB_BASE="/gitweb/" \
GITWEBPERLLIB=/usr/local/lib/perl5 \
gitweb-install
or something like that (I do not know any standard for the name of build
configuration variable which tells where to install web aplication;
do you?)
Well, I would perhaps start simply with
gitweb.perl
lib/Gitweb.pm
We can modify file organization later; what's important is the build
infrastructure (even if it is instruction in gitweb/INSTALL).
--
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html