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

[PATCH v6 0/4] githooks.txt improvements + core.hooksDirectory

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 4, 2016, 22:58 UTC
Message-ID
<1462402692-24712-1-git-send-email-avarab@gmail.com>
In-Reply-To
<xmqqa8k5eakb.fsf@gitster.mtv.corp.google.com>

Changed to reflect Junio's latest comment, diff between the whole series and the last one here at the end (made with -U0).

Ævar Arnfjörð Bjarmason (4):
  githooks.txt: Improve the intro section
  githooks.txt: Amend dangerous advice about 'update' hook ACL
  githooks.txt: Minor improvements to the grammar & phrasing
  hooks: Add ability to specify where the hook directory is
 Documentation/config.txt     | 17 +++++++++++
 Documentation/git-init.txt   |  7 ++++-
 Documentation/githooks.txt   | 73 ++++++++++++++++++++++++++------------------
 cache.h                      |  1 +
 config.c                     |  3 ++
 environment.c                |  1 +
 run-command.c                |  5 ++-
 t/t1350-config-hooks-path.sh | 37 ++++++++++++++++++++++
 8 files changed, 112 insertions(+), 32 deletions(-)
 create mode 100755 t/t1350-config-hooks-path.sh
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 9a74acd..6cc069f 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -635 +635 @@ per-repository basis, or as a more flexible and centralized
-alterantive to having an `init.templateDir` where you've changed
+alternative to having an `init.templateDir` where you've changed
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 6f562cd..d82e912 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -24,5 +24,3 @@ linkgit:git-config[1]).
-Hooks don't need to worry about the user's current working
-directory. Before Git invokes a hook it changes its working
-directory. The working directory will be the root of the working tree
-in a non-bare repository, or in the $GIT_DIR directory in a bare
-repository.
+Before Git invokes a hook, it changes its working directory to either
+the root of the working tree in a non-bare repository, or to the
+$GIT_DIR in a bare repository.
diff --git a/t/t1350-config-hooks-path.sh b/t/t1350-config-hooks-path.sh
index 6e4586a..5e3fb3a 100755
--- a/t/t1350-config-hooks-path.sh
+++ b/t/t1350-config-hooks-path.sh
@@ -11 +11 @@ test_expect_success 'set up a pre-commit hook in core.hooksPath' '
-EOF
+	EOF
@@ -14 +14 @@ EOF
-EOF
+	EOF
@@ -33 +33 @@ test_expect_success 'Check that various forms of specifying core.hooksPath work'
-EOF
+	EOF
-- 
2.1.3
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 15 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.