diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-04-15 13:50:16 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-15 13:50:16 -0700 |
| commit | a8c207797f2fe624c4959487e3508dde96f68976 (patch) | |
| tree | 6933bb5b61b08cc9adf218024a19a4651f6fd525 /builtin/clone.c | |
| parent | d690c44846b3e6450a98e09f43f4b40ec73f9762 (diff) | |
| parent | ec0f362e869fc74c3c9f011ae2097daa1c938833 (diff) | |
Merge branch 'jt/clone-guess-remote-head-fix'
"git clone" still gave the message about the default branch name;
this message has been turned into an advice message that can be
turned off.
* jt/clone-guess-remote-head-fix:
advice: allow disabling default branch name advice
builtin/clone: suppress unexpected default branch advice
remote: allow `guess_remote_head()` to suppress advice
Diffstat (limited to 'builtin/clone.c')
| -rw-r--r-- | builtin/clone.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 2993acb630..7d5b64a6a0 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -452,7 +452,9 @@ static struct ref *wanted_peer_refs(struct clone_opts *opts, if (head) tail_link_ref(head, &tail); if (option_single_branch) - refs = to_free = guess_remote_head(head, refs, 0); + refs = to_free = + guess_remote_head(head, refs, + REMOTE_GUESS_HEAD_QUIET); } else if (option_single_branch) { local_refs = NULL; tail = &local_refs; @@ -1525,7 +1527,8 @@ int cmd_clone(int argc, } remote_head = find_ref_by_name(refs, "HEAD"); - remote_head_points_at = guess_remote_head(remote_head, mapped_refs, 0); + remote_head_points_at = guess_remote_head(remote_head, mapped_refs, + REMOTE_GUESS_HEAD_QUIET); if (option_branch) { our_head_points_at = find_remote_branch(mapped_refs, option_branch); |
