Re: [PATCH] Git.pm: Always set Repository to absolute path if autodetecting

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

 



On Sat, Apr 18, 2009 at 08:13:05PM +0200, Johannes Schindelin wrote:
> On Sat, 18 Apr 2009, Frank Lichtenheld wrote:
> 
> > So far we only set it to absolute paths in some cases which lead to 
> > problems like wc_chdir not working.
> 
> We had something similar in setup.c until Linus pointed out that it 
> deteriorates performance.

You mean 044bbbcb63281dfdb78344ada2c44c96122dc822 ?

I don't think we're talking about the same issue here. The code in setup.c
prepares a variable for usage inside the running git command, while the Perl
code needs to prepare a variable for calling a git command, i.e. the content
of the GIT_DIR environment variable. As you can see from the code in setup.c
git will in fact make that content absolute before making it relative again,
so no harm should come from the fact that we're giving it an already absolute
value.

Also if we're giving it a relative path it will interpret it relative to the
current working directory and not GIT_WORK_TREE, so we should in fact not store
it relative because we would need to recalculate it after wc_chdir, which is
exactly what's causing problems.

Gruesse,
-- 
Frank Lichtenheld <frank@xxxxxxxxxxxxxx>
www: http://www.djpig.de/
--
To unsubscribe from this list: 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]