summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-26 02:35:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-11-26 02:35:50 (GMT)
commit5956732ebb4fe38d2fb0574004efabf76a8b2d10 (patch)
treeb2fd436e95eae66e3ab0d68336328aeec85167db
parentccf1bb3ab65f968b412b17cfdd9613b1d7bc61b4 (diff)
parentafa8c07a26b9783c41b1066b75a35de1610a3cfa (diff)
downloadgit-5956732ebb4fe38d2fb0574004efabf76a8b2d10.zip
git-5956732ebb4fe38d2fb0574004efabf76a8b2d10.tar.gz
git-5956732ebb4fe38d2fb0574004efabf76a8b2d10.tar.bz2
Merge branch 'jk/checkout-out-of-unborn' into maint
* jk/checkout-out-of-unborn: checkout: print a message when switching unborn branches
-rw-r--r--builtin/checkout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 781295b..a9c1b5a 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -951,6 +951,9 @@ static int switch_unborn_to_new_branch(const struct checkout_opts *opts)
strbuf_addf(&branch_ref, "refs/heads/%s", opts->new_branch);
status = create_symref("HEAD", branch_ref.buf, "checkout -b");
strbuf_release(&branch_ref);
+ if (!opts->quiet)
+ fprintf(stderr, _("Switched to a new branch '%s'\n"),
+ opts->new_branch);
return status;
}