From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [RFC] gitweb wishlist and TODO list
Date: Wed, 21 Jun 2006 19:36:46 +0200 [thread overview]
Message-ID: <e7c034$1c1$1@sea.gmane.org> (raw)
In-Reply-To: 20060621164503.GA1285@h4x0r5.com
Ryan Anderson wrote:
> On Wed, Jun 21, 2006 at 03:05:35PM +0200, Dennis Stosberg wrote:
>> (2) Setting %ENV has no effect on spawned processes under mod_perl,
>> so the git commands would never find the project directories.
>> My first thought was to set $GIT_DIR on the commands' command
>> lines like in open($fh, '$GIT_DIR=blah git-rev-list ...') but it
>> would lead to an extra shell being spawned on every invocation
>> of a git command.
>
> I haven't looked at gitweb much, but why can't you solve this by doing
> manual pipe,fork,exec combinations? That should give you complete
> control over the environment, right?
In gitweb.cgi we now use magic open "-|" invocation, e.g.:
open my $fd, "-|", "$gitbin/git-cat-file -t $hash" or return;
in git-rerere we still fork magically, but exec explicitely
my $pid = open($in, '-|');
die "$!" unless defined $pid;
if (!$pid) {
exec(qw(git ls-files -z -u)) or die "$!: ls-files";
}
The same is done in git-annotate (via open_pipe sub which takes care of
ActiveState Perl implementation); git-archimport, git-cvsexportcommit
(via safe_pipe_capture); git-send-email (without encapsulating in
a subroutine; it also uses backticks)
git-svn uses fork + redirecting output + exec and waitpid for quiet_run
subroutine and system call.
git-cvsimport uses system call, backticks, straight pipe open, i.e. using
"git-command |", and magic open "-|" like gitweb.cgi. git-cvsserver has
safe_pipe_capture, but sometimes uses backticks. git-fmt-merge-message uses
backticks only. git-mv uses backticks and pipe. git-svnimport uses system
call and pipe.
What a mess. We really need Git.pm module...
And to answer your question, AFAICT exec cannot modify environment, not like
execve (or execle wrapper). POE (POE::Wheel::Run) or IPC::Run modules
perhaps...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-06-21 17:38 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 16:51 [RFC] gitweb wishlist and TODO list Jakub Narebski
2006-06-20 17:33 ` Carl Worth
2006-06-20 17:46 ` Jakub Narebski
2006-06-20 17:55 ` Petr Baudis
2006-06-20 18:34 ` Jakub Narebski
2006-06-20 18:40 ` Petr Baudis
2006-06-21 14:52 ` Jakub Narebski
2006-06-20 19:33 ` Martin Langhoff
2006-06-20 19:56 ` Jakub Narebski
2006-06-20 21:17 ` Martin Langhoff
2006-07-01 10:35 ` Paul Mackerras
2006-06-21 13:05 ` Dennis Stosberg
2006-06-21 13:07 ` [PATCH 1/3] gitweb: Declare global variables with "our" Dennis Stosberg
2006-06-21 13:08 ` [PATCH 2/3] Add a parameter to specify the repository path Dennis Stosberg
2006-06-21 13:09 ` [PATCH 3/3] gitweb: Use --git-dir parameter instead of setting $ENV{'GIT_DIR'} Dennis Stosberg
2006-06-21 13:33 ` Timo Hirvonen
2006-06-21 13:42 ` Jakub Narebski
2006-06-21 13:30 ` [RFC] gitweb wishlist and TODO list Jakub Narebski
2006-06-22 10:00 ` Dennis Stosberg
2006-06-22 14:47 ` Ryan Anderson
2006-06-21 16:45 ` Ryan Anderson
2006-06-21 17:36 ` Jakub Narebski [this message]
2006-06-20 19:46 ` Junio C Hamano
2006-06-20 20:10 ` Petr Baudis
2006-06-20 20:59 ` Jakub Narebski
2006-06-20 21:25 ` Petr Baudis
2006-06-20 21:53 ` Thomas Glanzmann
2006-06-21 8:56 ` Josef Weidendorfer
2006-06-21 9:15 ` Jakub Narebski
2006-06-21 9:57 ` Josef Weidendorfer
2006-06-21 13:53 ` Jakub Narebski
[not found] ` <200606211802.41071.Josef.Weidendorfer@gmx.de>
2006-06-21 16:38 ` Jakub Narebski
2006-06-21 20:35 ` Josef Weidendorfer
2006-06-22 9:01 ` Jakub Narebski
2006-06-22 9:14 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2006-09-02 16:17 Jakub Narebski
2006-09-02 18:10 ` Marco Costalba
2006-09-02 19:29 ` Jakub Narebski
2006-09-03 4:26 ` Marco Costalba
2006-09-03 9:27 ` Jakub Narebski
2006-09-03 11:10 ` Marco Costalba
2006-09-03 11:24 ` Jakub Narebski
2006-09-08 0:44 ` Jakub Narebski
2006-09-08 1:16 ` Junio C Hamano
2006-09-08 9:11 ` Jakub Narebski
2006-09-03 11:52 Jakub Narebski
2006-09-03 12:18 ` Marco Costalba
2006-09-03 12:38 ` Jakub Narebski
2006-10-09 12:49 Jakub Narebski
2006-10-10 1:47 ` Luben Tuikov
2006-10-10 8:54 ` Jakub Narebski
2006-10-11 5:52 ` Junio C Hamano
2006-10-11 9:20 ` Jakub Narebski
2006-10-12 10:03 ` Junio C Hamano
2006-10-13 19:55 ` Jakub Narebski
2006-10-11 15:09 ` Jakub Narebski
2006-10-11 23:05 ` Jakub Narebski
2008-04-25 13:14 Jakub Narebski
2008-09-25 10:30 Jakub Narebski
2008-09-25 11:08 ` Pedro Melo
2008-09-25 12:23 ` Jakub Narebski
2008-09-25 14:45 ` Pedro Melo
2008-09-25 21:23 ` Jakub Narebski
2008-09-25 13:19 ` Wincent Colaiuta
2008-09-25 13:33 ` Petr Baudis
2008-09-25 15:41 ` Jakub Narebski
2008-09-28 10:01 ` Jakub Narebski
2008-09-28 21:18 ` Petr Baudis
2008-10-01 8:40 ` Ask Bjørn Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='e7c034$1c1$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.