Re: "make quick-install-man" broke recently
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 17, 2009, 17:09 UTC
- Message-ID
- <7vhbw6weo9.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <alpine.LFD.2.01.0908170932390.3162@localhost.localdomain>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 5 quoted lines
> Grr. Now 'check_path()' is no longer something generically useful. > > Could you perhaps instead only change 'checkout_entry()' to do this hack, > and leave 'check_path()' as a generic replacement for "lstat()" that > doesn't follow symlinks?
Given that non-empty base_dir is only used for "checkout-index --prefix", iow, the "path" internally used by git and fed to our symlink.c cache are supposed to be always relative to the work tree, I think that may be a good thing to do in the short-term.
But only if we won't add any more like "checkout-index --prefix". If you want to implement "git checkout --prefix=over-there/" and if you want to call check_path() directly (iow not as a part of callchain from checkout_entry()) while doing so, for example, you would regret keeping the check_path() function unaware of base_dir, as you would reintroduce the same bug.
I thought about getting rid of base_dir from struct checkout by running create_directories() in checkout-index and chdir(2) there, because this is a very special case codepath anyway. I actually haven't tried it, but it probably will have bad interactions with the way we find $GIT_DIR.