]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: move logic into fetch_task_create()
authorGlen Choo <chooglen@google.com>
Tue, 8 Mar 2022 00:14:31 +0000 (16:14 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Mar 2022 00:51:03 +0000 (16:51 -0800)
commit5370b91f3fae9d7a511e23142b55082200152cef
tree940a83f040537eff915348358645a5db52570786
parent73bc90d7e19c471318e799624b6d4c6d449c655d
submodule: move logic into fetch_task_create()

get_fetch_task() gets a fetch task by iterating the index; a future
commit will introduce a similar function, get_fetch_task_from_changed(),
that gets a fetch task from the list of changed submodules. Both
functions are similar in that they need to:

* create a fetch task
* initialize the submodule repo for the fetch task
* determine the default recursion mode

Move all of this logic into fetch_task_create() so that it is no longer
split between fetch_task_create() and get_fetch_task(). This will make
it easier to share code with get_fetch_task_from_changed().

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c