diff options
author | Jeff King <peff@peff.net> | 2017-09-06 07:53:10 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-07 08:46:53 +0900 |
commit | 1d0538e4860f3827bb711a4a05dbc2f194f767be (patch) | |
tree | da7dda784ddcd63e71801a1759ccab19f6470d6d /builtin/rev-parse.c | |
parent | for_each_bisect_ref(): don't trim refnames (diff) | |
download | tgif-1d0538e4860f3827bb711a4a05dbc2f194f767be.tar.xz |
rev-parse: don't trim bisect refnames
Using for_each_ref_in() with a full refname has always been
a questionable practice, but it became an error with
b9c8e7f2fb (prefix_ref_iterator: don't trim too much,
2017-05-22), making "git rev-parse --bisect" pretty reliably
show a BUG.
Commit 03df567fbf (for_each_bisect_ref(): don't trim
refnames, 2017-06-18) fixed this case for revision.c, but
rev-parse handles this option on its own. We can use the
same solution here (and piggy-back on its test).
Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rev-parse.c')
-rw-r--r-- | builtin/rev-parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index efdc14473b..710e4557d3 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -756,8 +756,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) continue; } if (!strcmp(arg, "--bisect")) { - for_each_ref_in("refs/bisect/bad", show_reference, NULL); - for_each_ref_in("refs/bisect/good", anti_reference, NULL); + for_each_fullref_in("refs/bisect/bad", show_reference, NULL, 0); + for_each_fullref_in("refs/bisect/good", anti_reference, NULL, 0); continue; } if (opt_with_value(arg, "--branches", &arg)) { |