summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
Diffstat (limited to 'help.c')
-rw-r--r--help.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/help.c b/help.c
index 5583f6c..602d9fa 100644
--- a/help.c
+++ b/help.c
@@ -761,12 +761,12 @@ static int append_similar_ref(const char *refname, const struct object_id *oid,
{
struct similar_ref_cb *cb = (struct similar_ref_cb *)(cb_data);
char *branch = strrchr(refname, '/') + 1;
- const char *remote;
/* A remote branch of the same name is deemed similar */
- if (skip_prefix(refname, "refs/remotes/", &remote) &&
+ if (starts_with(refname, "refs/remotes/") &&
!strcmp(branch, cb->base_ref))
- string_list_append(cb->similar_refs, remote);
+ string_list_append_nodup(cb->similar_refs,
+ shorten_unambiguous_ref(refname, 1));
return 0;
}