From: Junio C Hamano Date: Mon, 31 Mar 2014 23:31:16 +0000 (-0700) Subject: Merge branch 'wt/doc-submodule-name-path-confusion-2' X-Git-Tag: v2.0.0-rc0~40 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/00d4ff1a69883e24b095f45251d99143b5bc0320?ds=inline;hp=-c Merge branch 'wt/doc-submodule-name-path-confusion-2' * wt/doc-submodule-name-path-confusion-2: doc: submodule.*.branch config is keyed by name --- 00d4ff1a69883e24b095f45251d99143b5bc0320 diff --combined Documentation/git-submodule.txt index a15d92d09b,a7597bf225..77588b0dd8 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@@ -15,7 -15,7 +15,7 @@@ SYNOPSI 'git submodule' [--quiet] init [--] [...] 'git submodule' [--quiet] deinit [-f|--force] [--] ... 'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch] - [-f|--force] [--rebase|--merge|--checkout] [--reference ] + [-f|--force] [--checkout|--rebase|--merge] [--reference ] [--depth ] [--recursive] [--] [...] 'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) ] [commit] [--] [...] @@@ -162,7 -162,7 +162,7 @@@ update: + For updates that clone missing submodules, checkout-mode updates will create submodules with detached HEADs; all other modes will create - submodules with a local branch named after `submodule..branch`. + submodules with a local branch named after `submodule..branch`. + For updates that do not clone missing submodules, the submodule's HEAD is only touched when the remote reference does not match the @@@ -247,7 -247,7 +247,7 @@@ OPTION -b:: --branch:: Branch of repository to add as submodule. - The name of the branch is recorded as `submodule..branch` in + The name of the branch is recorded as `submodule..branch` in `.gitmodules` for `update --remote`. -f:: @@@ -299,31 -299,12 +299,31 @@@ In order to ensure a current tracking b fetches the submodule's remote repository before calculating the SHA-1. If you don't want to fetch, you should use `submodule update --remote --no-fetch`. ++ +Use this option to integrate changes from the upstream subproject with +your submodule's current HEAD. Alternatively, you can run `git pull` +from the submodule, which is equivalent except for the remote branch +name: `update --remote` uses the default upstream repository and +`submodule..branch`, while `git pull` uses the submodule's +`branch..merge`. Prefer `submodule..branch` if you want +to distribute the default upstream branch with the superproject and +`branch..merge` if you want a more native feel while working in +the submodule itself. -N:: --no-fetch:: This option is only valid for the update command. Don't fetch new objects from the remote site. +--checkout:: + This option is only valid for the update command. + Checkout the commit recorded in the superproject on a detached HEAD + in the submodule. This is the default behavior, the main use of + this option is to override `submodule.$name.update` when set to + `merge`, `rebase` or `none`. + If the key `submodule.$name.update` is either not explicitly set or + set to `checkout`, this option is implicit. + --merge:: This option is only valid for the update command. Merge the commit recorded in the superproject into the current branch