提交 057bc808 编写于 作者: J Junio C Hamano

path-list: fix path-list-insert return value

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: NJunio C Hamano <junkio@cox.net>
上级 a6ec3c15
......@@ -57,7 +57,7 @@ struct path_list_item *path_list_insert(const char *path, struct path_list *list
int index = add_entry(list, path);
if (index < 0)
index = 1 - index;
index = -1 - index;
return list->items + index;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册