filter out "remote/*/HEAD" references in 'got log' output
diff --git a/got/got.c b/got/got.c
index cce99fd..7bf9457 100644
--- a/got/got.c
+++ b/got/got.c
@@ -3047,8 +3047,12 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
continue;
if (strncmp(name, "heads/", 6) == 0)
name += 6;
- if (strncmp(name, "remotes/", 8) == 0)
+ if (strncmp(name, "remotes/", 8) == 0) {
name += 8;
+ s = strstr(name, "/" GOT_REF_HEAD);
+ if (s != NULL && s[strlen(s)] == '\0')
+ continue;
+ }
if (strncmp(name, "tags/", 5) == 0) {
err = got_object_open_as_tag(&tag, repo, re->id);
if (err) {