summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-05 14:49:49 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-05 14:49:49 -0700
commit188a634fec006a37489163b4bd36321d0a0ade77 (patch)
tree2b1a649c71b1e27e58675d6390b9387448dc0f40 /config.c
parentClarify git-cherry documentation. (diff)
parentcore.prefersymlinkrefs: use symlinks for .git/HEAD (diff)
downloadtgif-188a634fec006a37489163b4bd36321d0a0ade77.tar.xz
Merge branch 'fix'
* fix: core.prefersymlinkrefs: use symlinks for .git/HEAD repo-config: trim white-space before comment Fix for config file section parsing.
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/config.c b/config.c
index 47734140dd..87fb22041e 100644
--- a/config.c
+++ b/config.c
@@ -335,8 +335,9 @@ static int store_aux(const char* key, const char* value)
store.offset[store.seen] = ftell(config_file);
store.state = KEY_SEEN;
store.seen++;
- } else if(!strncmp(key, store.key, store.baselen))
- store.state = SECTION_SEEN;
+ } else if (strrchr(key, '.') - key == store.baselen &&
+ !strncmp(key, store.key, store.baselen))
+ store.state = SECTION_SEEN;
}
return 0;
}