Re: [PATCH 06/10] Completely move out worktree setup from setup_git_directory_gently()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 11, 2008, 13:31 UTC
- Message-ID
- <alpine.LSU.1.00.0803111429380.3873@racer.site>
- In-Reply-To
- <20080302103433.GA8970@laptop>
Hi,
On Sun, 2 Mar 2008, Nguyễn Thái Ngọc Duy wrote:
Show 5 quoted lines
> This was impossible earlier because git_dir can be relative. Now that > git_dir is absolute, I see no reason for worktree setup inside > setup_git_directory_gently(). The semantic is now clearer: if you need > worktree, call setup_work_tree yourself (well, I will clean up > setup_git_directory() part later)
As I said earlier, the work for getting the prefix as most likely be done already in the search for .git/. I mean, it _is_ the common case to have a working tree with a .git/ in it, and that's it.
So I am quite certain that it is not worth the complicated and intrusive patch to separate the logic.
Particularly since working tree has a bad reputation already, as Junio pointed out: whenever we touch it, we get burnt.
Ciao, Dscho