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

[PATCH] sample pre-commit hook: Use --bool when retrieving config var

From
Johan Herland <johan@herland.net>
Date
Sep 24, 2013, 07:52 UTC
Message-ID
<1380009176-10490-1-git-send-email-johan@herland.net>
Signed-off-by: Johan Herland <johan@herland.net>
---
Resend/reminder...
...Johan
 templates/hooks--pre-commit.sample | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample
index 586e3bf..68d62d5 100755
--- a/templates/hooks--pre-commit.sample
+++ b/templates/hooks--pre-commit.sample
@@ -16,7 +16,7 @@ else
 fi
 
 # If you want to allow non-ASCII filenames set this variable to true.
-allownonascii=$(git config hooks.allownonascii)
+allownonascii=$(git config --bool hooks.allownonascii)
 
 # Redirect output to stderr.
 exec 1>&2
-- 
1.8.1.rc2.269.g5aaac94
Next: Jonathan Nieder
Message 1 of 3 in “sample pre-commit hook: Use --bool when retrieving config var”
  1. sample pre-commit hook: Use --bool when retrieving config varJohan Herland, Sep 24, 2013
  2. Jonathan NiederSep 24, 2013
  3. Johan HerlandSep 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.