From: Phillip Wood Date: Tue, 25 Mar 2025 14:35:40 GMT Subject: Re: [PATCH v3 0/3] clone: suppress unexpected advice message during clone Message-ID: <69ccc682-3f81-440f-8e96-a5af5d49fa60@gmail.com> In-Reply-To: <20250325005148.1771502-1-jltobler@gmail.com> Hi Justin The range-diff below looks good to me, Thanks for working on this Phillip On 25/03/2025 00:51, Justin Tobler wrote: > Range-diff against v2: > 1: 4dae06d2dd = 1: 4dae06d2dd remote: allow `guess_remote_head()` to suppress advice > 2: 1180caabf1 ! 2: 2a69b881c4 builtin/clone: suppress unexpected default branch advice > @@ Commit message > Signed-off-by: Justin Tobler > > ## builtin/clone.c ## > +@@ builtin/clone.c: 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; > @@ builtin/clone.c: int cmd_clone(int argc, > } > > @@ t/t5607-clone-bundle.sh: test_expect_success 'git bundle v3 rejects unknown capa > + git -C bundle-repo commit --allow-empty -m init && > + git -C bundle-repo bundle create repo.bundle --all && > + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ > -+ git clone bundle-repo/repo.bundle clone-repo 2>err && > ++ git clone --single-branch bundle-repo/repo.bundle clone-repo 2>err && > + > + test_grep ! "hint: " err > +' > 3: 6fef1d070c = 3: 98b32cdc99 advice: allow disabling default branch name advice > > base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e