diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-12-11 11:36:56 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-13 15:53:50 -0800 |
commit | cc0f13c57dedaf62c9f852b6bf363aee7e3392f1 (patch) | |
tree | 4e86592e9f3f0e31f34b7bce9253f34d18c96e34 /refs.h | |
parent | cfaff3aac8063ec72f03c6761328c7fa44a15b34 (diff) | |
download | git-cc0f13c57dedaf62c9f852b6bf363aee7e3392f1.tar.gz |
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 'refs.h')
-rw-r--r-- | refs.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -170,8 +170,8 @@ int dwim_log(const char *str, int len, struct object_id *oid, char **ref); * The return value of `repo_default_branch_name()` is an allocated string. The * return value of `git_default_branch_name()` is a singleton. */ -const char *git_default_branch_name(void); -char *repo_default_branch_name(struct repository *r); +const char *git_default_branch_name(int quiet); +char *repo_default_branch_name(struct repository *r, int quiet); /* * A ref_transaction represents a collection of reference updates that |