diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-11-30 02:41:47 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-30 02:41:47 +0300 |
commit | 5126145ba8e8327b41e2fc235351645e0eb959da (patch) | |
tree | b5639b9588e632a09e6cb455e05bc0a908f79633 /t/t3200-branch.sh | |
parent | 44ac8fd1b4ce7598e2e5f4045dfbb6593a3f5b84 (diff) | |
parent | 98e7ab6d42beba8b35fefb3856b07ac20e89d1ca (diff) |
Merge branch 'jc/fix-ref-sorting-parse'
Things like "git -c branch.sort=bogus branch new HEAD", i.e. the
operation modes of the "git branch" command that do not need the
sort key information, no longer errors out by seeing a bogus sort
key.
* jc/fix-ref-sorting-parse:
for-each-ref: delay parsing of --sort=<atom> options
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-x | t/t3200-branch.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 53e0d094bb..8c5c1ccf33 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -1440,7 +1440,17 @@ test_expect_success 'invalid sort parameter in configuration' ' ( cd sort && git config branch.sort "v:notvalid" && - test_must_fail git branch + + # this works in the "listing" mode, so bad sort key + # is a dying offence. + test_must_fail git branch && + + # these do not need to use sorting, and should all + # succeed + git branch newone main && + git branch -c newone newerone && + git branch -m newone newestone && + git branch -d newerone newestone ) ' |