summaryrefslogtreecommitdiff
path: root/unimplemented.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-11-16 00:46:26 -0800
committerJunio C Hamano <gitster@pobox.com>2016-11-16 11:12:15 -0800
commita2e7b04c443e63696d3c61bac0734486132eedbf (patch)
treebfe11f2b7e876da705a9d898caff2f885212639b /unimplemented.sh
parent8c98a68981177013dfa0380968b57a1a37a45539 (diff)
downloadgit-a2e7b04c443e63696d3c61bac0734486132eedbf.tar.gz
rev-parse: fix parent shorthands with --symbolicjk/rev-parse-symbolic-parents-fix
The try_parent_shorthands() function shows each parent via show_rev(). We pass the correct parent sha1, but our "name" parameter still points at the original refname. So asking for a regular rev-parse works fine (it prints the sha1s), but asking for the symbolic name gives nonsense like: $ git rev-parse --symbolic HEAD^-1 HEAD ^HEAD which is always an empty set of commits. Asking for "^!" is likewise broken, with the added bonus that its prints ^HEAD for _each_ parent. And "^@" just prints HEAD repeatedly. Arguably it would be correct to just pass NULL as the name here, and always get the parent expressed as a sha1. The "--symbolic" documentaton claims only "as close to the original input as possible", and we certainly fallback to sha1s where necessary. But it's pretty easy to generate a symbolic name on the fly from the original. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unimplemented.sh')
0 files changed, 0 insertions, 0 deletions