diff options
author | Toon Claes <toon@iotcl.com> | 2025-02-06 07:33:33 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-06 12:23:54 -0800 |
commit | 7a52a8c7d855d3ed779059af160248934ac2c6b0 (patch) | |
tree | ac459e99c5846ff6e2d77769d9e408de4c9e7190 /commit.c | |
parent | 2ca67c6f1433586e61487295bb04cc424992db12 (diff) |
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>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions