summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-24 00:08:16 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-24 00:08:16 -0700
commit520d7e278cfd25057e883575060b7378dfab61dc (patch)
tree3f20d1056ba4a3e1de652e25d32f2736395a8e2b /dir.c
parentafb5f39e24eadc5933b34cfd17c1089e482d6a6b (diff)
parent41728d69426dd707d4978929f8f4ac7a16f115f3 (diff)
downloadgit-520d7e278cfd25057e883575060b7378dfab61dc.tar.gz
Merge branch 'maint'
* maint: Documentation/git-reset.txt: suggest git commit --amend in example. Build RPM with ETC_GITCONFIG=/etc/gitconfig Ignore all man sections as they are generated files. Fix typo in git-am: s/Was is/Was it/ Reverse the order of -b and --track in the man page. dir.c(common_prefix): Fix two bugs Conflicts: git.spec.in
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 6564a929ff..d3063520b0 100644
--- a/dir.c
+++ b/dir.c
@@ -34,8 +34,9 @@ int common_prefix(const char **pathspec)
prefix = slash - path + 1;
while ((next = *++pathspec) != NULL) {
int len = strlen(next);
- if (len >= prefix && !memcmp(path, next, len))
+ if (len >= prefix && !memcmp(path, next, prefix))
continue;
+ len = prefix - 1;
for (;;) {
if (!len)
return 0;