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

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 25, 2016, 05:35 UTC
Message-ID
<CAPig+cRYBChNVT2cixdzMCvO36Np-RdvTuccFshRoUDWnJv1Rw@mail.gmail.com>
In-Reply-To
<1461529229-15222-1-git-send-email-avarab@gmail.com>

On Sun, Apr 24, 2016 at 4:20 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 11 quoted lines
> Change the documentation so that:
> [...]
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
> @@ -130,7 +130,11 @@ The template directory will be one of the following (in order):
>  The default template directory includes some directory structure, suggested
> -"exclude patterns" (see linkgit:gitignore[5]), and sample hook files (see linkgit:githooks[5]).
> +"exclude patterns" (see linkgit:gitignore[5]), and example hook files.
> +
> +The example are all disabled by default. To enable a hook, rename it
s/example/examples/
Show 18 quoted lines
> +by removing its `.sample` suffix. See linkgit:githooks[5] for more
> +info on hook execution.
> diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
> @@ -13,18 +13,26 @@ $GIT_DIR/hooks/*
> +Hooks are programs you can place in the `$GIT_DIR/hooks` directory to
> +trigger action at certain points. Hooks that don't have the executable
> +bit set are ignored.
> +
> +When a hook is called in a non-bare repository the working directory
> +is guaranteed to be the root of the working tree, in a bare repository
> +the working directory will be the path to the repository. I.e. hooks
> +don't need to worry about the user's current working directory.
> +
> +Hooks can get their arguments via the environment, command-line
> +arguments, and stdin. See the documentation for each below hook for
> +details.
> +
> +When 'git init' is run it may depending on its configuration copy

s/may/&,/ s/configuration/&,/

Show 6 quoted lines
> +hooks to the new repository, see the the "TEMPLATE DIRECTORY" section
> +in linkgit:git-init[1] for details. When the rest of this document
> +refers to "default hooks" we're talking about the default template
> +shipped with Git.
> +
> +The currently supported hooks are described below.
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 10 of 17 in “githooks.txt: Improve the intro section”
  1. 1/3 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, Apr 24, 2016
  2. 2/3 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 24, 2016
  3. Jacob KellerApr 24, 2016
  4. 2/3 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 24, 2016
  5. Junio C HamanoApr 25, 2016
  6. Ævar Arnfjörð BjarmasonApr 26, 2016
  7. 3/3 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, Apr 24, 2016
  8. Junio C HamanoApr 25, 2016
  9. Ævar Arnfjörð BjarmasonApr 26, 2016
  10. Eric SunshineApr 25, 2016
  11. 0/3 Improvements to githooks.txt documentationÆvar Arnfjörð Bjarmason, Apr 25, 2016
  12. 1/3 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, Apr 25, 2016
  13. 2/3 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 25, 2016
  14. 3/3 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, Apr 25, 2016
  15. Junio C HamanoApr 25, 2016
  16. Junio C HamanoApr 25, 2016
  17. Ævar Arnfjörð BjarmasonApr 26, 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.