Re: 'setup_work_tree()' considered harmful
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 17, 2008, 11:01 UTC
- Message-ID
- <alpine.DEB.1.00.0806171142290.6439@racer>
- In-Reply-To
- <alpine.LFD.1.10.0806161723081.2949@woody.linux-foundation.org>
Hi,
On Mon, 16 Jun 2008, Linus Torvalds wrote:
> [ Dscho cc'd because I think he is the primary culprits for this thing, I > think. Commit e90fdc39b6903502192b2dd11e5503cea721a1ad in particular, > methinks. ]
Yes, I am not happy with work-tree. In fact, I grew to positively hate it. IMHO it was not well designed when it entered Git, and unfortunately my endeavors to clean it up were not very successful, either.
Show 11 quoted lines
> [...] > > In particular, doing a "git add ." will use absolute pathnames for all > git files, while a "git diff" will not. And this is quite noticeable - > the absolute pathnames are not just longer, they have more path > components in them. Making them a lot slower to look up and use. > > [...] > > In general, I think we've gone in the wrong direction with a lot of the > "make_absolute_path" stuff. See above. 5% performance loss is not good.
Yes, that is true. However, I think we need it for the case where work_tree is set (technically, we could try to be clever when work_tree is set in such a manner that we can operate with relative paths, but I think that is just not worth it).
So I am thinking about reverting to the old behavior, but _just_ for the common case that no work tree was set.
This might be more tricky than it used to be, because of the many special cases work trees require.
I briefly considered working on this now, but I simply do not have the time, and I seem to be unconcentrated these days. Probably the best thing would be to scrap the whole work-tree thing and throw it out, admitting that it was a mistake to begin with.
Ciao, Dscho