aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--builtin/branch.c2
-rwxr-xr-xt/t3200-branch.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index c964ac7bb4..15be0c03ef 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -809,7 +809,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
strbuf_addf(&branch_ref, "refs/heads/%s", branch_name);
if (!ref_exists(branch_ref.buf))
- ret = error((!argc || !strcmp(head, branch_name))
+ error((!argc || !strcmp(head, branch_name))
? _("No commit on branch '%s' yet.")
: _("No branch named '%s'."),
branch_name);
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 38c57de71b..7f605f865b 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -1394,7 +1394,7 @@ test_expect_success 'branch --delete --force removes dangling branch' '
test_expect_success 'use --edit-description' '
EDITOR=: git branch --edit-description &&
- test_must_fail git config branch.main.description &&
+ test_expect_code 1 git config branch.main.description &&
write_script editor <<-\EOF &&
echo "New contents" >"$1"