]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/branch-description-unset' into maint-2.38
authorJunio C Hamano <gitster@pobox.com>
Wed, 26 Oct 2022 00:11:37 +0000 (17:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Oct 2022 00:11:37 +0000 (17:11 -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 88b9c56e5cb0676ec61283eaffd2121eb73c4ce5,30dff9e712e07da908776461da4be545eefb55c9..c7ec1c752087ef3f255425f3e735d6ab651f6e30
@@@ -1368,20 -1267,10 +1368,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