summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-12-11 11:36:56 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-12-13 15:53:50 -0800
commitcc0f13c57dedaf62c9f852b6bf363aee7e3392f1 (patch)
tree4e86592e9f3f0e31f34b7bce9253f34d18c96e34 /builtin/clone.c
parentbranch -m: allow renaming a yet-unborn branch (diff)
downloadtgif-cc0f13c57dedaf62c9f852b6bf363aee7e3392f1.tar.xz
get_default_branch_name(): prepare for showing some advice
We are about to introduce a message giving users running `git init` some advice about `init.defaultBranch`. This will necessarily be done in `repo_default_branch_name()`. Not all code paths want to show that advice, though. In particular, the `git clone` codepath _specifically_ asks for `init_db()` to be quiet, via the `INIT_DB_QUIET` flag. In preparation for showing users above-mentioned advice, let's change the function signature of `get_default_branch_name()` to accept the parameter `quiet`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
-rw-r--r--builtin/clone.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index a0841923cf..64b1784011 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -1323,7 +1323,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
remote_head = NULL;
option_no_checkout = 1;
if (!option_bare) {
- const char *branch = git_default_branch_name();
+ const char *branch = git_default_branch_name(0);
char *ref = xstrfmt("refs/heads/%s", branch);
install_branch_config(0, branch, remote_name, ref);