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

2013-09-25 Thread Johan Herland
On Tue, Sep 24, 2013 at 9:22 PM, Jonathan Nieder jrnie...@gmail.com wrote:
 Johan Herland wrote:
 Signed-off-by: Johan Herland jo...@herland.net

 Thanks.

 What symptoms does this alleviate?  Is this to allow configurations like

 [hooks]
 allowNonAscii = 1

 and

 [hooks]
 allowNonAscii

 to do the expected thing, or is it something more subtle than that?

Nothing subtle. Just what you list. And for consistency with the other
sample hooks' use of git config.

...Johan

-- 
Johan Herland, jo...@herland.net
www.herland.net
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2013-09-24 Thread Johan Herland
Signed-off-by: Johan Herland jo...@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 12
-- 
1.8.1.rc2.269.g5aaac94

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2013-09-24 Thread Jonathan Nieder
Johan Herland wrote:

 Signed-off-by: Johan Herland jo...@herland.net

Thanks.

What symptoms does this alleviate?  Is this to allow configurations like

[hooks]
allowNonAscii = 1

and

[hooks]
allowNonAscii

to do the expected thing, or is it something more subtle than that?

Curious,
Jonathan
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2013-09-20 Thread Johan Herland
Signed-off-by: Johan Herland jo...@herland.net
---
 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 12
-- 
1.8.1.rc2.269.g5aaac94

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html