get_default_branch_name(): prepare for showing some advice
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 11 Dec 2020 11:36:56 +0000 (11:36 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Dec 2020 23:53:50 +0000 (15:53 -0800)
commitcc0f13c57dedaf62c9f852b6bf363aee7e3392f1
tree4e86592e9f3f0e31f34b7bce9253f34d18c96e34
parentcfaff3aac8063ec72f03c6761328c7fa44a15b34
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>
builtin/clone.c
builtin/init-db.c
refs.c
refs.h
remote.c