Commit d9498b2018a8dfb3527a982ca140d9beb2e52dca

Stefan Sperling 2019-02-06T00:13:31

don't bother showing the HEAD ref in 'got log'

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/got/got.c b/got/got.c
index 096c8f7..a9bc81f 100644
--- a/got/got.c
+++ b/got/got.c
@@ -625,6 +625,8 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
 		if (got_object_id_cmp(re->id, id) != 0)
 			continue;
 		name = got_ref_get_name(re->ref);
+		if (strcmp(name, GOT_REF_HEAD) == 0)
+			continue;
 		if (strncmp(name, "refs/", 5) == 0)
 			name += 5;
 		if (strncmp(name, "heads/", 6) == 0)