]> git.ipfire.org Git - thirdparty/git.git/commit - transport.c
push: add option to push only submodules
authorBrandon Williams <bmwill@google.com>
Mon, 19 Dec 2016 18:25:33 +0000 (10:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Dec 2016 20:26:34 +0000 (12:26 -0800)
commit225e8bf778d21104da10cfb316e0e2898b24e809
treede1b2a86ba8a6b39aa47de0ac5a3ca004cb5442e
parent6c656c3fe4ba13cdf03ed85c059690653fd376cb
push: add option to push only submodules

Teach push the --recurse-submodules=only option.  This enables push
to recursively push all unpushed submodules while leaving the
superproject unpushed.

This is a desirable feature in a scenario where updates to the
superproject are handled automatically by some other means, perhaps
a tool like Gerrit code review.  In this scenario, a developer could
make a change which spans multiple submodules and then push their
commits for code review.  Upon completion of the code review, their
commits can be accepted and applied to their respective submodules
while the code review tool can then automatically update the
superproject to the most recent SHA1 of each submodule.  This would
reduce the merge conflicts in the superproject that could occur if
multiple people are contributing to the same submodule.

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