Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

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

From: Frank Lichtenheld <hidden>
Date: 2016-06-15 22:46:37

On Sat, Apr 18, 2009 at 08:13:05PM +0200, Johannes Schindelin wrote:
On Sat, 18 Apr 2009, Frank Lichtenheld wrote:
quoted
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 [off-list ref]
www: http://www.djpig.de/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help