diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-11-05 11:33:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-05 11:33:19 -0800 |
commit | efcce2e1f0b37aed045d3e2b747380adf418bdd2 (patch) | |
tree | 709170cd9b9dbb34b9873bd482bf5f5f03ffd414 /t/t3200-branch.sh | |
parent | 7bc9ed0d5b3dd2fb61cad033bb19e72358d54227 (diff) | |
parent | 045a476f91a9a308c823a2709977163238baa3fd (diff) | |
download | git-efcce2e1f0b37aed045d3e2b747380adf418bdd2.tar.gz git-efcce2e1f0b37aed045d3e2b747380adf418bdd2.tar.xz |
Merge branch 'mv/maint-branch-m-symref'
* mv/maint-branch-m-symref:
update-ref --no-deref -d: handle the case when the pointed ref is packed
git branch -m: forbid renaming of a symref
Fix git update-ref --no-deref -d.
rename_ref(): handle the case when the reflog of a ref does not exist
Fix git branch -m for symrefs.
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-x | t/t3200-branch.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 2147eacc5..25e9971fd 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -112,6 +112,15 @@ test_expect_success 'config information was renamed, too' \ "test $(git config branch.s.dummy) = Hello && test_must_fail git config branch.s/s/dummy" +test_expect_success 'renaming a symref is not allowed' \ +' + git symbolic-ref refs/heads/master2 refs/heads/master && + test_must_fail git branch -m master2 master3 && + git symbolic-ref refs/heads/master2 && + test -f .git/refs/heads/master && + ! test -f .git/refs/heads/master3 +' + test_expect_success \ 'git branch -m u v should fail when the reflog for u is a symlink' ' git branch -l u && |