[PATCH v5 0/2] submodule update: add --remote for submodule's upstream changes
- From
W. Trevor King <wking@tremily.us>
- Date
- Nov 28, 2012, 19:30 UTC
- Message-ID
- <cover.1354130656.git.wking@tremily.us>
- In-Reply-To
- <20121128165334.GA20483@odin.tremily.us>
From: "W. Trevor King" <wking@tremily.us>
On Wed, Nov 28, 2012 at 11:53:34AM -0500, W. Trevor King wrote:
Show 6 quoted lines
> I thought of a better idea on the train. How about adding `--remote` > to `submodule update` that overrides the gitlinked SHA-1 with the > SHA-1 for origin/$branch? All of the other checkout/merge/rebase > functionality is untouched. The only thing that changes is where we > look for the update. I'm working up the patch now, and will submit v5 > shortly.
Here it is.
Changes since v4:
* Remove `update --branch` in favor of the new `update --remote` logic as mentioned above. * Optional config overrides for submodule.<name>.branch (as suggested by Jens) * Save --branch as submodule.<name>.branch instead of requiring --local-branch. * Restructure doc edits.
I'm a lot happier with this two-patch proposal. The first patch implements --remote and documents submodule.<name>.branch. The second patch just gives you a convenient way to set it. I haven't heard from anyone other than Heiko recently about the --branch/--remote-branch choice, so I returned to the simpler --branch side effect storage from v1. I'd be happy to submit v6 with explicit --remote-branch recording if desired.
W. Trevor King (2): submodule update: add --remote for submodule's upstream changes submodule add: If --branch is given, record it in .gitmodules
Documentation/config.txt | 9 +++++---- Documentation/git-submodule.txt | 26 +++++++++++++++++++++++++- Documentation/gitmodules.txt | 5 +++++ git-submodule.sh | 30 +++++++++++++++++++++++++++++- t/t7400-submodule-basic.sh | 1 + t/t7406-submodule-update.sh | 31 +++++++++++++++++++++++++++++++ 6 files changed, 96 insertions(+), 6 deletions(-)
-- 1.8.0.2.gad10246.dirty