[PATCH v8 1/3] submodule: add get_submodule_config helper funtion

2012-12-19 Thread wking
From: "W. Trevor King" Several submodule configuration variables (e.g. fetchRecurseSubmodules) are read from .gitmodules with local overrides from the usual git config files. This shell function mimics that logic to help initialize configuration variables in git-submodule.sh. Signed-off-by: W.

[PATCH v8 3/3] submodule add: If --branch is given, record it in .gitmodules

2012-12-19 Thread wking
From: "W. Trevor King" This allows you to easily record a submodule..branch option in .gitmodules when you add a new submodule. With this patch, $ git submodule add -b [] $ git config -f .gitmodules submodule..branch reduces to $ git submodule add -b [] This means that future call

[PATCH v8 2/3] submodule update: add --remote for submodule's upstream changes

2012-12-19 Thread wking
From: "W. Trevor King" The current `update` command incorporates the superproject's gitlinked SHA-1 ($sha1) into the submodule HEAD ($subsha1). Depending on the options you use, it may checkout $sha1, rebase the $subsha1 onto $sha1, or merge $sha1 into $subsha1. This helps you keep up with chan

[PATCH v8 0/3] submodule update: add --remote for submodule's upstream changes

2012-12-19 Thread wking
From: "W. Trevor King" Comments on v7 seem to have petered out, so here's v8. Changes since v7: * Series based on gitster/master instead of v1.8.0. * In Documentation/config.txt, restored trailing line of submodule..update documentation, which I had accidentally removed in v7. * In Document