diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2012-10-18 14:08:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-18 14:36:17 -0700 |
commit | 13baa9fe866f63311af5a5ee318beddb16eb5df4 (patch) | |
tree | cc50b33e17a4ed48860c96fb7757a417e3ff34d0 /t | |
parent | 0fe700e311f2d7e55eb23fe941fab9155d7f91df (diff) | |
download | git-13baa9fe866f63311af5a5ee318beddb16eb5df4.tar.gz |
branch: show targets of deleted symrefs, not sha1s
git branch reports the abbreviated hash of the head commit of
a deleted branch to make it easier for a user to undo the
operation. For symref branches this doesn't help. Print the
symref target instead for them.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3200-branch.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 1323f6ff71..80e6be39d7 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -265,8 +265,7 @@ test_expect_success 'config information was renamed, too' \ test_expect_success 'deleting a symref' ' git branch target && git symbolic-ref refs/heads/symref refs/heads/target && - sha1=$(git rev-parse symref | cut -c 1-7) && - echo "Deleted branch symref (was $sha1)." >expect && + echo "Deleted branch symref (was refs/heads/target)." >expect && git branch -d symref >actual && test_path_is_file .git/refs/heads/target && test_path_is_missing .git/refs/heads/symref && @@ -276,7 +275,7 @@ test_expect_success 'deleting a symref' ' test_expect_success 'deleting a dangling symref' ' git symbolic-ref refs/heads/dangling-symref nowhere && test_path_is_file .git/refs/heads/dangling-symref && - echo "Deleted branch dangling-symref (was 0000000)." >expect && + echo "Deleted branch dangling-symref (was nowhere)." >expect && git branch -d dangling-symref >actual && test_path_is_missing .git/refs/heads/dangling-symref && test_i18ncmp expect actual |