git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* $GIT_DIR is no longer set when pre-commit hooks are called
@ 2018-08-22 23:16 Gregory Oschwald
  2018-08-26  0:41 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Gregory Oschwald @ 2018-08-22 23:16 UTC (permalink / raw)
  To: git

As of the release of 2.18.0, $GIT_DIR is no longer set before calling
pre-commit hooks. This change was introduced in "set_work_tree: use
chdir_notify" (8500e0de) and is still present in master.

I reviewed the discussion when this change was initially submitted,
and I don't think this behavior change was intentional.

I have several hooks that were broken like this, and from a quick
Google search, using $GIT_DIR without setting a default does seem
pretty common in hooks.

Greg

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-28 12:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-22 23:16 $GIT_DIR is no longer set when pre-commit hooks are called Gregory Oschwald
2018-08-26  0:41 ` Jeff King
2018-08-27 16:25   ` Johannes Schindelin
2018-08-27 23:37     ` Jeff King
2018-08-28 12:50       ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).