]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.h
submodules: introduce check to see whether to touch a submodule
authorStefan Beller <sbeller@google.com>
Tue, 14 Mar 2017 21:46:34 +0000 (14:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Mar 2017 01:15:54 +0000 (18:15 -0700)
commit84f8925eeb97827e9d334b8b9ff7282177ab9105
treedd40bcd460d225043efc43feb8017a88e4624047
parentcf055e465f6febedb8189407a901042814d6b5d8
submodules: introduce check to see whether to touch a submodule

In later patches we introduce the --recurse-submodule flag for commands
that modify the working directory, e.g. git-checkout.

It is potentially expensive to check if a submodule needs an update,
because a common theme to interact with submodules is to spawn a child
process for each interaction.

So let's introduce a function that checks if a submodule needs
to be checked for an update before attempting the update.

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