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

Re: [PATCH v4 1/4] githooks.txt: Improve the intro section

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 26, 2016, 19:48 UTC
Message-ID
<xmqqr3dsf8xg.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1461694402-9629-2-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>  * We note what happens with chdir() before a hook is called, nothing
>    documented this explicitly, but the current behavior is
>    predictable. It helps a lot to know what directory these hooks will
>    be executed from.

I _think_ this item is what you meant by "changed the wording for all of this to hopefully be more clear in my v4.", but I do not think it addresses "find it somehow and then chdir()" confusion.

It does say "it is run at", meaning that chdir() happens before it is run. That is not sufficient to let the reader guess taht chdir() happens before the hooks directory is checked relative to that directory to find the hook to run.

> +When 'git init' is run it may, depending on its configuration, copy
> +hooks to the new repository, see the the "TEMPLATE DIRECTORY" section
"... is run, it may, depending on its configuration, copy hooks..."
If that is too much sentence fragments, you could reorder them, e.g.
	'git init' may copy hooks to the new repository, depending
	on its configuration.  See the "TEMPLATE DIRECTORY" section
That would fix "the the" as a side effect ;-).
Show 8 quoted lines
> +in linkgit:git-init[1] for details. When the rest of this document
> +refers to "default hooks" it's talking about the default template
> +shipped with Git.
> +
> +The currently supported hooks are described below.
>  
>  HOOKS
>  -----
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 3 of 20 in “githooks.txt improvements + core.hooksDirectory”
  1. 0/4 githooks.txt improvements + core.hooksDirectoryÆvar Arnfjörð Bjarmason, Apr 26, 2016
  2. 1/4 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, Apr 26, 2016
  3. Junio C HamanoApr 26, 2016
  4. 2/4 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 26, 2016
  5. Junio C HamanoApr 26, 2016
  6. 3/4 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, Apr 26, 2016
  7. 4/4 hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, Apr 26, 2016
  8. Junio C HamanoApr 26, 2016
  9. 0/4 githooks.txt improvements + core.hooksDirectoryÆvar Arnfjörð Bjarmason, May 4, 2016
  10. 1/4 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, May 4, 2016
  11. 2/4 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, May 4, 2016
  12. 3/4 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, May 4, 2016
  13. 4/4 hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, May 4, 2016
  14. Junio C HamanoMay 4, 2016
  15. 0/4 githooks.txt improvements + core.hooksDirectoryÆvar Arnfjörð Bjarmason, May 4, 2016
  16. 1/4 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, May 4, 2016
  17. 2/4 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, May 4, 2016
  18. 3/4 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, May 4, 2016
  19. 4/4 hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, May 4, 2016
  20. Junio C HamanoMay 4, 2016

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.