Re: GIT_INDEX_FILE relative path breaks in subdir
- From
Joey Hess <id@joeyh.name>
- Date
- May 23, 2016, 17:29 UTC
- Message-ID
- <20160523172951.GA1184@kitenet.net>
- In-Reply-To
- <xmqqwpmkafmb.fsf@gitster.mtv.corp.google.com>
Junio C Hamano wrote:
Show 11 quoted lines
> Joey Hess <id@joeyh.name> writes: > > > This seems to make it basically impossible for any program that wants to > > use GIT_INDEX_FILE to use anything other than an absolute path; > > there are too many configurations to keep straight that could change how > > git interprets what should be a simple relative path to a file. > > Thanks for digging. Perhaps this needs to be documented (not "in > this case it is take as relative to that, in this other case, ...", > but "you cannot rely on relative being relative to something you > think").
Documenting it that way feels like ¯\_(ツ)_/¯ I feel it should be made consistently relative to top of work tree.
Seems fairly unlikely that any scripts driving git rely on it being relative to the pwd when GIT_WORK_TREE etc is set.
(I'd prefer relative to pwd because that is much more sane IMHO, but making that change is more likely to break something.)
-- see shy jo