Skip to content

Commit

Permalink
rev-list: fix finish_object() call
Browse files Browse the repository at this point in the history
The callback to traverse_commit_list() are to take linked name_path and
a string for the last path component.

If the callee used its parameters, it would have seen duplicated leading
paths. In this particular case, the callee does not use this argument but
that is not a reason to leave the call broken.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Aug 22, 2011
1 parent f67d2e8 commit 5f25b62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/rev-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static void show_object(struct object *obj, const struct name_path *path, const
*/
const char *ep = strchr(name, '\n');

finish_object(obj, path, name);
finish_object(obj, path, component);
if (ep) {
printf("%s %.*s\n", sha1_to_hex(obj->sha1),
(int) (ep - name),
Expand Down

0 comments on commit 5f25b62

Please sign in to comment.