summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6ec3c1)
raw | patch | inline | side by side (parent: a6ec3c1)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 11 Nov 2006 22:45:35 +0000 (14:45 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 11 Nov 2006 22:46:11 +0000 (14:46 -0800) |
When path-list-insert is called on an existing path, it returned an
unrelated element in the list. Luckily most of the callers are
ignoring the return value, but merge-recursive uses it at three places
and this would have resulted in a bogus rename detection.
Signed-off-by: Junio C Hamano <junkio@cox.net>
unrelated element in the list. Luckily most of the callers are
ignoring the return value, but merge-recursive uses it at three places
and this would have resulted in a bogus rename detection.
Signed-off-by: Junio C Hamano <junkio@cox.net>
path-list.c | patch | blob | history |
diff --git a/path-list.c b/path-list.c
index 0c332dc7b556ba894f0452b0172e7dd1e485f929..f8800f8e66e39f035820c2aeb0843fb3ebf65fb3 100644 (file)
--- a/path-list.c
+++ b/path-list.c
int index = add_entry(list, path);
if (index < 0)
- index = 1 - index;
+ index = -1 - index;
return list->items + index;
}