git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] Documentation/githooks: mention pwd, $GIT_PREFIX

From
RHRichard Hansen <rhansen@bbn.com>
Date
Jan 10, 2015, 06:49 UTC
Message-ID
<1420872598-9609-1-git-send-email-rhansen@bbn.com>

A couple of patches to document and test that hooks are run from the top-level directory and that GIT_PREFIX is set to the subdirectory that Git was run from (like !aliases).

The new documentation is mostly lifted from the documentation for alias.*. I don't think the new documentation is perfectly clear, but it's a start. In particular, what does Git do for hook pwd and GIT_PREFIX when it is run from within a bare repository? Or from within .git? Or if GIT_WORK_TREE (--work-tree) and/or GIT_DIR (--git-dir) are set? Many of these same questions apply to !aliases, so the documentation for alias.* should also be shored up.

-Richard
Richard Hansen (2):
  Documentation/githooks: mention pwd, $GIT_PREFIX
  t1020-subdirectory.sh: check hook pwd, $GIT_PREFIX
 Documentation/githooks.txt |  6 ++++++
 t/t1020-subdirectory.sh    | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
-- 
2.2.1
Next: Richard Hansen
Message 1 of 9 in “Documentation/githooks: mention pwd, $GIT_PREFIX”
  1. 0/2 Documentation/githooks: mention pwd, $GIT_PREFIXRichard Hansen, Jan 10, 2015
  2. 1/2 Documentation/githooks: mention pwd, $GIT_PREFIXRichard Hansen, Jan 10, 2015
  3. 2/2 t1020-subdirectory.sh: check hook pwd, $GIT_PREFIXRichard Hansen, Jan 10, 2015
  4. Johannes SixtJan 10, 2015
  5. 0/2 Documentation/githooks: mention pwd, $GIT_PREFIXRichard Hansen, Jan 10, 2015
  6. 1/2 Documentation/githooks: mention pwd, $GIT_PREFIXRichard Hansen, Jan 10, 2015
  7. Junio C HamanoJan 12, 2015
  8. 2/2 t1020-subdirectory.sh: check hook pwd, $GIT_PREFIXRichard Hansen, Jan 10, 2015
  9. Junio C HamanoJan 12, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.