From: Junio C Hamano Date: Thu, 10 Jul 2014 18:08:31 +0000 (-0700) Subject: Merge branch 'mc/doc-submodule-sync-recurse' into maint X-Git-Tag: v2.0.2~10 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3fea9ebdffaf37e5495e364bd868d8bda06350fd?ds=inline;hp=-c Merge branch 'mc/doc-submodule-sync-recurse' into maint * mc/doc-submodule-sync-recurse: submodule: document "sync --recursive" --- 3fea9ebdffaf37e5495e364bd868d8bda06350fd diff --combined Documentation/git-submodule.txt index 89c4d3e394,068ad453ca..8e6af65da0 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@@ -15,12 -15,12 +15,12 @@@ SYNOPSI 'git submodule' [--quiet] init [--] [...] 'git submodule' [--quiet] deinit [-f|--force] [--] ... 'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch] - [-f|--force] [--rebase] [--reference ] [--depth ] - [--merge] [--recursive] [--] [...] + [-f|--force] [--rebase|--merge] [--reference ] + [--depth ] [--recursive] [--] [...] 'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) ] [commit] [--] [...] 'git submodule' [--quiet] foreach [--recursive] - 'git submodule' [--quiet] sync [--] [...] + 'git submodule' [--quiet] sync [--recursive] [--] [...] DESCRIPTION @@@ -229,7 -229,7 +229,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:: @@@ -281,31 -281,12 +281,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