path: root/t/
diff options
authorJeff King <>2013-01-23 06:23:27 (GMT)
committerJunio C Hamano <>2013-01-23 16:41:50 (GMT)
commit785a04298177e155dc7391e7234945b38b624e34 (patch)
treef952b01753afe3f46393957ba3b13484153d432d /t/
parent1b86bbb0ade4641c2da0dc74ebca1c09ec772bb4 (diff)
archive-tar: use parse_config_key when parsing config
This is fewer lines of code, but more importantly, fixes a bogus pointer offset. We are looking for "tar." in the section, but later assume that the dot we found is at offset 9, not 3. This is a holdover from an earlier iteration of 767cf45 which called the section "tarfilter". As a result, we could erroneously reject some filters with dots in their name, as well as read uninitialized memory. Reported by (and test by) René Scharfe. Signed-off-by: Jeff King <> Reviewed-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 2 insertions, 1 deletions
diff --git a/t/ b/t/
index e7c240f..3fbd366 100755
--- a/t/
+++ b/t/
@@ -212,7 +212,8 @@ test_expect_success 'git-archive --prefix=olde-' '
test_expect_success 'setup tar filters' '
git config "tr ab ba" &&
git config "tr ab ba" &&
- git config true
+ git config true &&
+ git config tar.invalid baz
test_expect_success 'archive --list mentions user filter' '