summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-03-29 16:56:04 -0400
committerJunio C Hamano <gitster@pobox.com>2011-03-29 14:30:05 -0700
commitc063f0a973832784f09a6901eac9501b6f796bde (patch)
treebc1db732bff84ad68a563662d174698e6ce882b5 /revision.c
parent03bb5789cd97de989897e1c9de71a2831ada0544 (diff)
downloadgit-c063f0a973832784f09a6901eac9501b6f796bde.tar.gz
revision.c: refactor notes ref expansion
No need to do it ourselves when there is a library function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/revision.c b/revision.c
index 0f38364cf3..5826e5d599 100644
--- a/revision.c
+++ b/revision.c
@@ -1374,13 +1374,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->show_notes_given = 1;
if (!revs->notes_opt.extra_notes_refs)
revs->notes_opt.extra_notes_refs = xcalloc(1, sizeof(struct string_list));
- if (!prefixcmp(arg+13, "refs/"))
- /* happy */;
- else if (!prefixcmp(arg+13, "notes/"))
- strbuf_addstr(&buf, "refs/");
- else
- strbuf_addstr(&buf, "refs/notes/");
strbuf_addstr(&buf, arg+13);
+ expand_notes_ref(&buf);
string_list_append(revs->notes_opt.extra_notes_refs,
strbuf_detach(&buf, NULL));
} else if (!strcmp(arg, "--no-notes")) {