The "-l" option in "git branch -l" is an unfortunate short-hand for
"--create-reflog", but many users, both old and new, somehow expect
it to be something else, perhaps "--list". This step warns when "-l"
is used as a short-hand for "--create-reflog" and warns about the
future repurposing of the it when it is used.
* jk/branch-l-0-deprecation:
branch: deprecate "-l" option
t: switch "branch -l" to "branch --create-reflog"
t3200: unset core.logallrefupdates when testing reflog creation
test_expect_success 'git branch -c d e should work' '
git branch -l d &&
git branch --create-reflog d &&
git reflog exists refs/heads/d &&
git config branch.d.dummy Hello &&
git branch -c d e &&
@ -459,7 +459,7 @@ test_expect_success 'git branch -c d e should work' '
@@ -459,7 +459,7 @@ test_expect_success 'git branch -c d e should work' '
'
test_expect_success 'git branch --copy is a synonym for -c' '
git branch -l copy &&
git branch --create-reflog copy &&
git reflog exists refs/heads/copy &&
git config branch.copy.dummy Hello &&
git branch --copy copy copy-to &&
@ -486,7 +486,7 @@ test_expect_success 'git branch -c ee ef should copy ee to create branch ef' '
@@ -486,7 +486,7 @@ test_expect_success 'git branch -c ee ef should copy ee to create branch ef' '
'
test_expect_success 'git branch -c f/f g/g should work' '
test_expect_success 'git branch -c zz zz/zz should fail' '
git branch -l zz &&
git branch --create-reflog zz &&
git reflog exists refs/heads/zz &&
test_must_fail git branch -c zz zz/zz
'
test_expect_success 'git branch -c b/b b should fail' '
git branch -l b/b &&
git branch --create-reflog b/b &&
test_must_fail git branch -c b/b b
'
test_expect_success 'git branch -C o/q o/p should work when o/p exists' '
git branch -l o/q &&
git branch --create-reflog o/q &&
git reflog exists refs/heads/o/q &&
git reflog exists refs/heads/o/p &&
git branch -C o/q o/p
@ -570,10 +570,10 @@ test_expect_success 'git branch -C master5 master5 should work when master is ch
@@ -570,10 +570,10 @@ test_expect_success 'git branch -C master5 master5 should work when master is ch
'
test_expect_success 'git branch -C ab cd should overwrite existing config for cd' '
git branch -l cd &&
git branch --create-reflog cd &&
git reflog exists refs/heads/cd &&
git config branch.cd.dummy CD &&
git branch -l ab &&
git branch --create-reflog ab &&
git reflog exists refs/heads/ab &&
git config branch.ab.dummy AB &&
git branch -C ab cd &&
@ -685,7 +685,7 @@ test_expect_success 'renaming a symref is not allowed' '
@@ -685,7 +685,7 @@ test_expect_success 'renaming a symref is not allowed' '
'
test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '