]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/branch-description-unset'
authorJunio C Hamano <gitster@pobox.com>
Mon, 17 Oct 2022 21:56:33 +0000 (14:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Oct 2022 21:56:33 +0000 (14:56 -0700)
"GIT_EDITOR=: git branch --edit-description" resulted in failure,
which has been corrected.

* jc/branch-description-unset:
  branch: do not fail a no-op --edit-desc

1  2 
builtin/branch.c
t/t3200-branch.sh

Simple merge
index b82cffc0b35848389174d49f3a256cbeade668a0,30dff9e712e07da908776461da4be545eefb55c9..d5a1fc1375ffc6e4c10f90be095e4214df78ca3f
@@@ -1367,20 -1267,10 +1367,23 @@@ test_expect_success 'attempt to delete 
        test_must_fail git branch -d my10
  '
  
 +test_expect_success 'branch --delete --force removes dangling branch' '
 +      git checkout main &&
 +      test_commit unstable &&
 +      hash=$(git rev-parse HEAD) &&
 +      objpath=$(echo $hash | sed -e "s|^..|.git/objects/&/|") &&
 +      git branch --no-track dangling &&
 +      mv $objpath $objpath.x &&
 +      test_when_finished "mv $objpath.x $objpath" &&
 +      git branch --delete --force dangling &&
 +      git for-each-ref refs/heads/dangling >actual &&
 +      test_must_be_empty actual
 +'
 +
  test_expect_success 'use --edit-description' '
+       EDITOR=: git branch --edit-description &&
+       test_must_fail git config branch.main.description &&
        write_script editor <<-\EOF &&
                echo "New contents" >"$1"
        EOF