summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-05 21:49:49 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-05 21:49:49 (GMT)
commit188a634fec006a37489163b4bd36321d0a0ade77 (patch)
tree2b1a649c71b1e27e58675d6390b9387448dc0f40
parent81ae43cdc4ec4bfba1638aa9786e08322d10b72c (diff)
parente388c7382563b7497397c78bc078d0679dc891a8 (diff)
downloadgit-188a634fec006a37489163b4bd36321d0a0ade77.zip
git-188a634fec006a37489163b4bd36321d0a0ade77.tar.gz
git-188a634fec006a37489163b4bd36321d0a0ade77.tar.bz2
Merge branch 'fix'
* fix: core.prefersymlinkrefs: use symlinks for .git/HEAD repo-config: trim white-space before comment Fix for config file section parsing.
-rw-r--r--config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/config.c b/config.c
index 4773414..87fb220 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;
}