Commit 6b765bce16c2f40c9a89a5407ba1121bdb30b5ae

Stefan Sperling 2018-07-22T15:46:50

fix logic error in print_commits()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/got/got.c b/got/got.c
index 0575cac..5edca44 100644
--- a/got/got.c
+++ b/got/got.c
@@ -392,7 +392,7 @@ print_commits(struct got_object *root_obj, struct got_object_id *root_id,
 	const struct got_error *err;
 	struct got_commit_graph *graph;
 	int ncommits, found_obj = 0;
-	int is_root_path = (strcmp(path, "/") != 0);
+	int is_root_path = (strcmp(path, "/") == 0);
 
 	err = got_commit_graph_open(&graph, root_id, first_parent_traversal,
 	    repo);