Skip to content

Commit 5956732

Browse files
committed
Merge branch 'jk/checkout-out-of-unborn' into maint
* jk/checkout-out-of-unborn: checkout: print a message when switching unborn branches
2 parents ccf1bb3 + afa8c07 commit 5956732

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builtin/checkout.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,9 @@ static int switch_unborn_to_new_branch(const struct checkout_opts *opts)
951951
strbuf_addf(&branch_ref, "refs/heads/%s", opts->new_branch);
952952
status = create_symref("HEAD", branch_ref.buf, "checkout -b");
953953
strbuf_release(&branch_ref);
954+
if (!opts->quiet)
955+
fprintf(stderr, _("Switched to a new branch '%s'\n"),
956+
opts->new_branch);
954957
return status;
955958
}
956959

0 commit comments

Comments
 (0)