Re: GIT_DIR vs. --git-dir
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Sep 24, 2012, 09:53 UTC
- Message-ID
- <CACsJy8ChOd-684V8Dsbwf2nOsW8UMnYn_vo5MAZ6ixyq_QvMkw@mail.gmail.com>
- In-Reply-To
- <50601274.80506@drmicha.warpmail.net>
On Mon, Sep 24, 2012 at 2:57 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:
> It might be difficult to implement, but I'm sorry I can't follow the > argumentation above at all; it's not based on what we do in other places > and other cases.
My point is, what's so special about --git-dir? what about --work-tree, or "commit -F path"? It's hard to draw a line there. Config files are a special case, because git is the only one that reads the file. "~" expansion depends on shell setting. If users turn it off, they may be surprised that "~foo" is turned to /home/foo while they really mean "~foo". Warning is the only sensible thing we could do.
-- Duy