summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:43:18 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:43:18 -0800
commit9cfe5f4be36facb593d29d54a3b77e539bd39e87 (patch)
treedfbdcd87a5530a3b53027d2b545ddf75ea81f25f
parentMerge branch 'cn/config-missing-path' (diff)
parentcheckout: print a message when switching unborn branches (diff)
downloadtgif-9cfe5f4be36facb593d29d54a3b77e539bd39e87.tar.xz
Merge branch 'jk/checkout-out-of-unborn'
* 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 781295b2c9..a9c1b5a95f 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;
}