Re: [PATCH 39/47] setup: limit get_git_work_tree()'s to explicit setup case only
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jan 18, 2011, 13:59 UTC
- Message-ID
- <AANLkTinTSiDhfcEzYVji0xD44BY0HPpzLYuZoNgMPdkt@mail.gmail.com>
- In-Reply-To
- <20110118074400.GA4185@burratino>
2011/1/18 Jonathan Nieder <jrnieder@gmail.com>:
> How about something like this patch? It only concerns the > GIT_WORK_TREE variable and --work-tree command line option; the > semantics of core.worktree are unaffected.
Perhaps only activate your code if $GIT_WORK_TREE is absolute path? Things may go wild if $GIT_WORK_TREE is relative. We can die() if GIT_WORK_TREE is set but not used. Annoying, but better than leave the errors unseen.
> (Sorry, no real patch yet. Updating the test to reflect the change is > a pain in the neck.)
Yeah, I count on it to (over-)catch every mistakes in setup code :D
-- Duy