git/builtin
Toon Claes 7a52a8c7d8 clone: introduce struct clone_opts in builtin/clone.c
There is a lot of state stored in global variables in builtin/clone.c.
In the long run we'd like to remove many of those.

Introduce `struct clone_opts` in this file. This struct will be used to
contain all details needed to perform the clone. The struct object can
be thrown around to all the functions that need these details.

The first field we're adding is `wants_head`. In some scenarios
(specifically when both `--single-branch` and `--branch` are given) we
are not interested in `HEAD` on the remote. The field `wants_head` in
`struct clone_opts` will hold this information. We could have put
`option_branch` and `option_single_branch` into that struct instead, but
in a following commit we'll be using `wants_head` as well.

Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-06 12:23:54 -08:00
..
add.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
am.c Merge branch 'jc/show-usage-help' 2025-01-28 13:02:22 -08:00
annotate.c
apply.c
archive.c
bisect.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
blame.c Merge branch 'ps/the-repository' 2025-01-21 08:44:54 -08:00
branch.c Merge branch 'rs/ref-fitler-used-atoms-value-fix' 2025-01-29 14:05:09 -08:00
bugreport.c diagnose: stop using `the_repository` 2024-12-18 10:44:31 -08:00
bundle.c Merge branch 'jt/bundle-fsck' 2024-12-13 07:33:36 -08:00
cat-file.c Merge branch 'ps/build-sign-compare' 2024-12-23 09:32:11 -08:00
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
checkout--worker.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
checkout-index.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
checkout.c Merge branch 'ps/build-sign-compare' 2024-12-23 09:32:11 -08:00
clean.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
clone.c clone: introduce struct clone_opts in builtin/clone.c 2025-02-06 12:23:54 -08:00
column.c
commit-graph.c progress: stop using `the_repository` 2024-12-18 10:44:30 -08:00
commit-tree.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
commit.c Merge branch 'ja/doc-commit-markup-updates' 2025-01-29 14:05:09 -08:00
config.c builtin: pass repository to sub commands 2024-11-26 10:36:08 +09:00
count-objects.c packfile: pass down repository to `has_object[_kept]_pack` 2024-12-04 08:21:54 +09:00
credential-cache--daemon.c Merge branch 'mh/credential-cache-authtype-request-fix' 2025-01-28 13:02:24 -08:00
credential-cache.c
credential-store.c
credential.c Merge branch 'jc/show-usage-help' 2025-01-28 13:02:22 -08:00
describe.c Merge branch 'ps/build-sign-compare' 2024-12-23 09:32:11 -08:00
diagnose.c diagnose: stop using `the_repository` 2024-12-18 10:44:31 -08:00
diff-files.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
diff-index.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
diff-tree.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
diff.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
difftool.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
fast-export.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
fast-import.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
fetch-pack.c oddballs: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
fetch.c Merge branch 'bf/fetch-set-head-config' 2025-01-06 12:02:21 -08:00
fmt-merge-msg.c
for-each-ref.c ref-filter: remove ref_format_clear() 2025-01-21 09:06:24 -08:00
for-each-repo.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
fsck.c progress: stop using `the_repository` 2024-12-18 10:44:30 -08:00
fsmonitor--daemon.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
gc.c Merge branch 'jc/show-usage-help' 2025-01-28 13:02:22 -08:00
get-tar-commit-id.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
grep.c Revert barrier-based LSan threading race workaround 2025-01-01 14:13:01 -08:00
hash-object.c
help.c pager: stop using `the_repository` 2024-12-18 10:44:30 -08:00
hook.c builtin: pass repository to sub commands 2024-11-26 10:36:08 +09:00
index-pack.c Merge branch 'jk/pack-header-parse-alignment-fix' 2025-01-28 13:02:23 -08:00
init-db.c builtin/init-db: fix leaking directory paths 2024-11-21 08:23:45 +09:00
interpret-trailers.c
log.c Merge branch 'ps/the-repository' 2025-01-21 08:44:54 -08:00
ls-files.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
ls-remote.c
ls-tree.c
mailinfo.c mailinfo: stop using `the_repository` 2024-12-18 10:44:31 -08:00
mailsplit.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
merge-base.c commit-reach: use `size_t` to track indices when computing merge bases 2024-12-27 08:12:40 -08:00
merge-file.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
merge-index.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
merge-ours.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
merge-recursive.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
merge-tree.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
merge.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
mktag.c
mktree.c
multi-pack-index.c midx-write: pass down repository to `write_midx_file[_only]` 2024-12-04 10:32:20 +09:00
mv.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
name-rev.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
notes.c builtin: pass repository to sub commands 2024-11-26 10:36:08 +09:00
pack-objects.c Merge branch 'ps/build-sign-compare' 2024-12-23 09:32:11 -08:00
pack-redundant.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
pack-refs.c diff.h: fix index used to loop through unsigned integer 2024-12-06 20:20:03 +09:00
patch-id.c builtin/patch-id: fix type of `get_one_patchid()` 2024-12-06 20:20:05 +09:00
prune-packed.c
prune.c progress: stop using `the_repository` 2024-12-18 10:44:30 -08:00
pull.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
push.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
range-diff.c Merge branch 'js/range-diff-diff-merges' 2024-12-23 09:32:17 -08:00
read-tree.c
rebase.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
receive-pack.c Merge branch 'ps/the-repository' 2025-01-21 08:44:54 -08:00
reflog.c diff.h: fix index used to loop through unsigned integer 2024-12-06 20:20:03 +09:00
refs.c Merge branch 'kn/pass-repo-to-builtin-sub-sub-commands' 2024-12-04 10:14:47 +09:00
remote-ext.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
remote-fd.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
remote.c Merge branch 'ps/the-repository' 2025-01-21 08:44:54 -08:00
repack.c Merge branch 'ps/build-sign-compare' 2024-12-23 09:32:11 -08:00
replace.c refs: allow passing flags when setting up a transaction 2024-11-21 07:59:14 +09:00
replay.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
rerere.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
reset.c diff.h: fix index used to loop through unsigned integer 2024-12-06 20:20:03 +09:00
rev-list.c Merge branch 'jc/show-usage-help' 2025-01-28 13:02:22 -08:00
rev-parse.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
revert.c diff.h: fix index used to loop through unsigned integer 2024-12-06 20:20:03 +09:00
rm.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
send-pack.c send-pack: stop using `the_repository` 2024-12-18 10:44:30 -08:00
shortlog.c diff.h: fix index used to loop through unsigned integer 2024-12-06 20:20:03 +09:00
show-branch.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
show-index.c Merge branch 'jc/show-index-h-update' 2025-01-31 09:44:16 -08:00
show-ref.c
sparse-checkout.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
stash.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
stripspace.c
submodule--helper.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
symbolic-ref.c
tag.c ref-filter: remove ref_format_clear() 2025-01-21 09:06:24 -08:00
unpack-file.c oddballs: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
unpack-objects.c Merge branch 'jk/pack-header-parse-alignment-fix' 2025-01-28 13:02:23 -08:00
update-index.c builtins: send usage_with_options() help text to standard output 2025-01-17 13:30:03 -08:00
update-ref.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
update-server-info.c server-info: stop using `the_repository` 2024-12-18 10:44:30 -08:00
upload-archive.c builtin: send usage() help text to standard output 2025-01-17 13:30:03 -08:00
upload-pack.c serve: stop using `the_repository` 2024-12-18 10:44:30 -08:00
var.c Merge branch 'jc/show-usage-help' 2025-01-28 13:02:22 -08:00
verify-commit.c
verify-pack.c
verify-tag.c ref-filter: remove ref_format_clear() 2025-01-21 09:06:24 -08:00
worktree.c Merge branch 'ps/build-sign-compare' 2024-12-23 09:32:11 -08:00
write-tree.c