summaryrefslogtreecommitdiff
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-03 20:45:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-09 23:42:23 (GMT)
commitc036c4c5e426cc7ee8070038607edf06ef1d661e (patch)
tree4199271cb7e8884c8adeb34453efb9841bf27dab /builtin/rev-parse.c
parent13243c2c7a758bb6510ba26d0372f384b5f422ce (diff)
downloadgit-c036c4c5e426cc7ee8070038607edf06ef1d661e.zip
git-c036c4c5e426cc7ee8070038607edf06ef1d661e.tar.gz
git-c036c4c5e426cc7ee8070038607edf06ef1d661e.tar.bz2
rev-parse: A and B in "rev-parse A..B" refer to committish
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rev-parse.c')
-rw-r--r--builtin/rev-parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 98d1cbe..16b98b5 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -238,7 +238,7 @@ static int try_difference(const char *arg)
next = "HEAD";
if (dotdot == arg)
this = "HEAD";
- if (!get_sha1(this, sha1) && !get_sha1(next, end)) {
+ if (!get_sha1_committish(this, sha1) && !get_sha1_committish(next, end)) {
show_rev(NORMAL, end, next);
show_rev(symmetric ? NORMAL : REVERSED, sha1, this);
if (symmetric) {
@@ -278,7 +278,7 @@ static int try_parent_shorthands(const char *arg)
return 0;
*dotdot = 0;
- if (get_sha1(arg, sha1))
+ if (get_sha1_committish(arg, sha1))
return 0;
if (!parents_only)