OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f9b620
)
Fix off-by-one in read_tree_recursive
author
Johannes Schindelin
<johannes.schindelin@gmx.de>
Mon, 20 Apr 2009 17:44:53 +0000
(19:44 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 20 Apr 2009 20:44:14 +0000
(13:44 -0700)
Found by valgrind.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree.c
patch
|
blob
|
history
diff --git
a/tree.c
b/tree.c
index
0d703a0
..
5ab90af
100644
(file)
--- a/
tree.c
+++ b/
tree.c
@@
-62,6
+62,7
@@
static int match_tree_entry(const char *base, int baselen, const char *path, uns
continue;
/* pathspecs match only at the directory boundaries */
if (!matchlen ||
+ baselen == matchlen ||
base[matchlen] == '/' ||
match[matchlen - 1] == '/')
return 1;