Re: [DONOTAPPLY PATCH 2/3] setup: warn about implicit worktree with $GIT_DIR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King wrote:
> On Tue, Mar 26, 2013 at 01:21:42PM -0700, Jonathan Nieder wrote:

>> If we want this warning, would something like the following do?
>> 
>> 	warning: You have set GIT_DIR without setting GIT_WORK_TREE
>> 	hint: In this case, GIT_WORK_TREE defaults to '.'
>> 	hint: To suppress this message, set GIT_WORK_TREE='.'
>
> That can help by teaching people how GIT_DIR behaves in general.

Yes, I think it would have helped in this case.  If I understand
correctly then for a while Richard was habitually setting GIT_DIR to
mean "act on this repository" and thought the worktree was
automatically being set to the containing directory.

I think patch 3 is a bad direction to go because there will always be
old scripts that follow what used to be the recommended way to use
GIT_DIR.  In the long term a warning like this that doesn't break them
(or a fatal error that at least doesn't confuse them) might be a good
way to go.

Thanks for your thoughtful work, as always.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]