Re: [PATCH 3/3] gitweb: Use --git-dir parameter instead of setting $ENV{'GIT_DIR'}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Timo Hirvonen wrote:

> Dennis Stosberg <dennis@xxxxxxxxxxxx> wrote:
> 
>> -    open my $fd, "-|", "$gitbin/git-cat-file -t $hash" or return;
>> +    open my $fd, "-|", "$gitbin/git --git-dir=$git_dir cat-file -t $hash" or return;
> 
> How about adding a function to simplify calling the git commands?
> 
> Something like git("cat-file -t $hash") which would return
> "$gitbin/git --git-dir=$git_dir cat-file -t $hash" string.

Or rather add a function(s) to call git commands, either returning git command
output, or filehandle to read from, e.g.

  my $fd = git_open("cat-file", "-t $hash") or return; 

i.e. each parameter separately, just in case.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]