Re: rev-parse --show-toplevel broken during exec'ed rebase?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 16, 2018, 21:10 UTC
- Message-ID
- <xmqqefg2sx88.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180716183942.GB22298@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 20 quoted lines
> On Mon, Jul 16, 2018 at 11:14:51AM -0700, Junio C Hamano wrote: > >> Porcelain, but I suspect in practice always giving GIT_DIR and >> GIT_WORK_TREE would work well for many existing hooks. > > Yeah, that may be an option. I don't remember if this was discussed in > this thread or elsewhere, but setting GIT_DIR is a regression for hooks, > etc, which do: > > git -C /some/other/repo log > > or similar. I'm not sure if that falls under "actual regression" or > "just how it happened to work in the past". I'm not even sure it worked > that way _consistently_ in the past. > > The best practice if you're switching directories is to do: > > unset $(git rev-parse --local-env-vars) > > though I highly doubt that most people bother.
Yeah, that is exactly where my "in practice" comes from. I think I caught and killed another potential regression last week while it is still in the draft status during my review ;-)