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

[PATCH 3/9] mark contributed hooks executable

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 25, 2013, 20:55 UTC
Message-ID
<20131125205530.GT4212@google.com>
In-Reply-To
<20131125205119.GQ4212@google.com>
The docs in contrib/hooks/pre-auto-gc-battery suggest:
	For example, if the hook is stored in
	/usr/share/git-core/contrib/hooks/pre-auto-gc-battery:
	chmod a+x pre-auto-gc-battery
	cd /path/to/your/repository.git
	ln -sf /usr/share/git-core/contrib/hooks/pre-auto-gc-battery \
	     hooks/pre-auto-gc

Unfortunately on multi-user systems most users do not have write access to /usr. Better to mark the sample hooks executable in the first place so users do not have to tweak their permissions to use them by symlinking into .git/hooks/.

Reported-by: Olivier Berger <olivier.berger@it-sudparis.eu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 contrib/hooks/post-receive-email  | 1 -
 contrib/hooks/pre-auto-gc-battery | 1 -
 contrib/hooks/setgitperms.perl    | 0
 contrib/hooks/update-paranoid     | 0
 4 files changed, 2 deletions(-)
 mode change 100644 => 100755 contrib/hooks/pre-auto-gc-battery
 mode change 100644 => 100755 contrib/hooks/setgitperms.perl
 mode change 100644 => 100755 contrib/hooks/update-paranoid
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 8ee410f..8747b84 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -22,7 +22,6 @@
 # For example, on debian the hook is stored in
 # /usr/share/git-core/contrib/hooks/post-receive-email:
 #
-#  chmod a+x post-receive-email
 #  cd /path/to/your/repository.git
 #  ln -sf /usr/share/git-core/contrib/hooks/post-receive-email hooks/post-receive
 #
diff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery
old mode 100644
new mode 100755
index 1f914c9..9d0c2d1
--- a/contrib/hooks/pre-auto-gc-battery
+++ b/contrib/hooks/pre-auto-gc-battery
@@ -13,7 +13,6 @@
 # For example, if the hook is stored in
 # /usr/share/git-core/contrib/hooks/pre-auto-gc-battery:
 #
-# chmod a+x pre-auto-gc-battery
 # cd /path/to/your/repository.git
 # ln -sf /usr/share/git-core/contrib/hooks/pre-auto-gc-battery \
 #	hooks/pre-auto-gc
diff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl
old mode 100644
new mode 100755
diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
old mode 100644
new mode 100755
-- 
1.8.4.1
Previous: Jonathan NiederNext: Jonathan Nieder
Message 4 of 13 in “War on #! lines in shell libraries”
  1. 0/9 War on #! lines in shell librariesJonathan Nieder, Nov 25, 2013
  2. 1/9 mark Windows build scripts executableJonathan Nieder, Nov 25, 2013
  3. 2/9 mark perl test scripts executableJonathan Nieder, Nov 25, 2013
  4. 3/9 mark contributed hooks executableJonathan Nieder, Nov 25, 2013
  5. 4/9 contrib: remove git-p4importJonathan Nieder, Nov 25, 2013
  6. Pete WyckoffNov 26, 2013
  7. 5/9 gitk: chmod +x po2msgJonathan Nieder, Nov 25, 2013
  8. 6/9 git-gui: chmod +x po2msg, windows/git-gui.shJonathan Nieder, Nov 25, 2013
  9. 7/9 test: make FILEMODE a lazy prereqJonathan Nieder, Nov 25, 2013
  10. 8/9 test: replace shebangs with descriptions in shell librariesJonathan Nieder, Nov 25, 2013
  11. Eric SunshineNov 26, 2013
  12. 8/9 test: replace shebangs with descriptions in shell librariesJonathan Nieder, Nov 26, 2013
  13. 9/9 remove #!interpreter line from shell librariesJonathan Nieder, Nov 25, 2013

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.