path: root/t/
diff options
authorJunio C Hamano <>2016-07-25 21:13:32 (GMT)
committerJunio C Hamano <>2016-07-25 21:13:32 (GMT)
commit6b34ce90a748ff6bd679c29bc3f37a75a1bd3441 (patch)
tree9e03790de15600b437eb2f43b1f2f2faa9964278 /t/
parent08bb3500a2a718c3c78b0547c68601cafa7a8fd9 (diff)
parent7a418f3a17b95746eb94cfd55f4fe0385d058777 (diff)
Merge branch 'mh/split-under-lock'
Further preparatory work on the refs API before the pluggable backend series can land. * mh/split-under-lock: (33 commits) lock_ref_sha1_basic(): only handle REF_NODEREF mode commit_ref_update(): remove the flags parameter lock_ref_for_update(): don't resolve symrefs lock_ref_for_update(): don't re-read non-symbolic references refs: resolve symbolic refs first ref_transaction_update(): check refname_is_safe() at a minimum unlock_ref(): move definition higher in the file lock_ref_for_update(): new function add_update(): initialize the whole ref_update verify_refname_available(): adjust constness in declaration refs: don't dereference on rename refs: allow log-only updates delete_branches(): use resolve_refdup() ref_transaction_commit(): correctly report close_ref() failure ref_transaction_create(): disallow recursive pruning refs: make error messages more consistent lock_ref_sha1_basic(): remove unneeded local variable read_raw_ref(): move docstring to header file read_raw_ref(): improve docstring read_raw_ref(): rename symref argument to referent ...
Diffstat (limited to 't/')
1 files changed, 9 insertions, 0 deletions
diff --git a/t/ b/t/
index ac9c764..8a833f3 100755
--- a/t/
+++ b/t/
@@ -79,6 +79,15 @@ test_expect_success 'git branch -m dumps usage' '
test_i18ngrep "branch name required" err
+test_expect_success 'git branch -m m broken_symref should work' '
+ test_when_finished "git branch -D broken_symref" &&
+ git branch -l m &&
+ git symbolic-ref refs/heads/broken_symref refs/heads/i_am_broken &&
+ git branch -m m broken_symref &&
+ git reflog exists refs/heads/broken_symref &&
+ test_must_fail git reflog exists refs/heads/i_am_broken
test_expect_success 'git branch -m m m/m should work' '
git branch -l m &&
git branch -m m m/m &&