Commit 7143d404530ce5fa5c9f2aea9d293d4de857d0e7

Stefan Sperling 2019-03-12T11:55:36

make 'got log' and 'tog log' skip revs in the got/ namespace

diff --git a/got/got.c b/got/got.c
index f97925f..38d5762 100644
--- a/got/got.c
+++ b/got/got.c
@@ -634,6 +634,8 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
 			continue;
 		if (strncmp(name, "refs/", 5) == 0)
 			name += 5;
+		if (strncmp(name, "got/", 4) == 0)
+			continue;
 		if (strncmp(name, "heads/", 6) == 0)
 			name += 6;
 		if (strncmp(name, "remotes/", 8) == 0)
diff --git a/tog/tog.c b/tog/tog.c
index 9086729..64b0fb3 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -902,6 +902,8 @@ build_refs_str(char **refs_str, struct got_reflist_head *refs,
 			continue;
 		if (strncmp(name, "refs/", 5) == 0)
 			name += 5;
+		if (strncmp(name, "got/", 4) == 0)
+			continue;
 		if (strncmp(name, "heads/", 6) == 0)
 			name += 6;
 		if (strncmp(name, "remotes/", 8) == 0)