]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: refactor show_submodule_summary with helper function
authorJacob Keller <jacob.keller@gmail.com>
Wed, 31 Aug 2016 23:27:24 +0000 (16:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Sep 2016 01:07:10 +0000 (18:07 -0700)
commit8e6df65015f9a947d9ccca8950c2d60a4600cba2
tree577e1c132014a23de504fe8cc02e77dc98d68242
parent602a283afb225ea094f4582e02e94cfd7f5cabf0
submodule: refactor show_submodule_summary with helper function

A future patch is going to add a new submodule diff format which
displays an inline diff of the submodule changes. To make this easier,
and to ensure that both submodule diff formats use the same initial
header, factor out show_submodule_header() function which will print the
current submodule header line, and then leave the show_submodule_summary
function to lookup and print the submodule log format.

This does create one format change in that "(revision walker failed)"
will now be displayed on its own line rather than as part of the message
because we no longer perform this step directly in the header display
flow. However, this is a rare case as most causes of the failure will be
due to a missing commit which we already check for and avoid previously.
flow. However, this is a rare case and shouldn't impact much.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c