Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
revision.c: refactor notes ref expansion
author
Jeff King
<peff@peff.net>
Tue, 29 Mar 2011 20:56:04 +0000
(16:56 -0400)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 29 Mar 2011 21:30:05 +0000
(14:30 -0700)
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>
revision.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
03bb578
)
diff --git
a/revision.c
b/revision.c
index 0f38364cf3f81a9088305ca802adf8b7c9260e91..5826e5d599d3cffc2134e6482902dd16de00ab02 100644
(file)
--- 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));
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);
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")) {
string_list_append(revs->notes_opt.extra_notes_refs,
strbuf_detach(&buf, NULL));
} else if (!strcmp(arg, "--no-notes")) {