Thread (1 message) 1 message, 1 author, 2018-07-16

Re: rev-parse --show-toplevel broken during exec'ed rebase?

From: Junio C Hamano <hidden>
Date: 2018-07-16 21:10:35

Jeff King [off-list ref] writes:
On Mon, Jul 16, 2018 at 11:14:51AM -0700, Junio C Hamano wrote:
quoted
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 ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help