Thread (4 messages) flat view 4 messages, 1 author, 2016-06-15
STALE3738d

[PATCH 1/3] rev-list: fix finish_object() call

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:49
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 builtin/rev-list.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 56727e8..d789279 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -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),
-- 
1.7.6.472.g4bfe7c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help