]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: refactor logic to determine changed submodules
authorBrandon Williams <bmwill@google.com>
Tue, 2 May 2017 01:02:39 +0000 (18:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 May 2017 01:45:11 +0000 (10:45 +0900)
commitaacc5c1a81c004efccff8075edb78acdf5f15264
treeae258f71e0bfdda8ed898158b4c52f85a2594b7c
parent7c8d2b00f2516a0b30aaa3f59dceaf4fe83f8729
submodule: refactor logic to determine changed submodules

There are currently two instances (fetch and push) where we want to
determine if submodules have changed given some revision specification.
These two instances don't use the same logic to generate a list of
changed submodules and as a result there is a fair amount of code
duplication.

This patch refactors these two code paths such that they both use the
same logic to generate a list of changed submodules.  This also makes it
easier for future callers to be able to reuse this logic as they only
need to create an argv_array with the revision specification to be using
during the revision walk.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c