push: fix --dry-run to not push submodules
commit0301c821c5cd124733accfbff0ddbf7f0b0ee9fb
authorBrandon Williams <bmwill@google.com>
Thu, 17 Nov 2016 18:46:04 +0000 (17 10:46 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Nov 2016 16:39:14 +0000 (23 08:39 -0800)
treeb41edb26a5a5e4b91b24124bec9c0df067e2be19
parent1aa73658405ad423127b3c14ac13e46f9ad0163a
push: fix --dry-run to not push submodules

Teach push to respect the --dry-run option when configured to
recursively push submodules 'on-demand'.  This is done by passing the
--dry-run flag to the child process which performs a push for a
submodules when performing a dry-run.

In order to preserve good user experience, the additional check for
unpushed submodules is skipped during a dry-run when
--recurse-submodules=on-demand.  The check is skipped because the submodule
pushes were performed as dry-runs and this check would always fail as the
submodules would still need to be pushed.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
submodule.h
t/t5531-deep-submodule-push.sh
transport.c