submodule.c: move submodule merging to merge-recursive.c
commit18cfc0886617e28fb6d29d579bec0ffcdb439196
authorStefan Beller <sbeller@google.com>
Tue, 15 May 2018 20:00:28 +0000 (15 13:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 May 2018 01:08:43 +0000 (16 10:08 +0900)
tree70f603f53147672e2a41e3dd4f82f66d3bb80e58
parentccdcbd54c4475c2238b310f7113ab3075b5abc9c
submodule.c: move submodule merging to merge-recursive.c

In a later patch we want to improve submodule merging by using the output()
function in merge-recursive.c for submodule merges to deliver a consistent
UI to users.

To do so we could either make the output() function globally available
so we can use it in submodule.c#merge_submodule(), or we could integrate
the submodule merging into the merging code. Choose the later as we
generally want to move submodules closer into the core.

Therefore we move any function related to merging submodules
(merge_submodule(), find_first_merges() and print_commit) to
merge-recursive.c.  We'll keep add_submodule_odb() in submodule.c as it
is used by other submodule functions. While at it, add a TODO note that
we do not really like the function add_submodule_odb().

This commit is best viewed with --color-moved.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c
submodule.c
submodule.h