Re: Not going beyond symbolic links
From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:06
Hi, On Mon, 4 Aug 2008, Linus Torvalds wrote:
On Mon, 4 Aug 2008, Junio C Hamano wrote:quoted
quoted
The rewritten 'has_symlink_leading_path()' should do ok, but it migth still be a huge performance downside to check all the paths for things like "git add -u".Not yet. I think this is a necessary "correctness" thing to do regardless of the performance impact, and adding the logic to stop at submodule boundary (aka gitlinks) should come before optimization.Well, "performance" is a feature too, and it's not correct to say that "X should be fixed before optimization". If "X" slows things down, the question should be whether it really needs fixing.. Yes, we find symlinks when we do _new_ files, but is it really so bad to assume that existing directories that we have already added to the index are stable? It can easily be seen as a feature too that you can force git to ignore the symlink and see it as a real directory.
Actually, whatever you want, it needs fixing. I vividly remember being quite pissed by Git replacing a symbolic link in my working directory with a directory, and instead of updating the files which were technically outside of the repository, Git populated that newly created directory. However, please note that Junio's patch affects git-add, AFAIR, not git-update-index. Ciao, Dscho