1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-07 17:53:12 +01:00
git/Documentation
Jens Lehmann 88a21979c5 fetch/pull: recurse into submodules when necessary
To be able to access all commits of populated submodules referenced by the
superproject it is sufficient to only then let "git fetch" recurse into a
submodule when the new commits fetched in the superproject record new
commits for it. Having these commits present is extremely useful when
using the "--submodule" option to "git diff" (which is what "git gui" and
"gitk" do since 1.6.6), as all submodule commits needed for creating a
descriptive output can be accessed. Also merging submodule commits (added
in 1.7.3) depends on the submodule commits in question being present to
work. Last but not least this enables disconnected operation when using
submodules, as all commits necessary for a successful "git submodule
update -N" will have been fetched automatically. So we choose this mode as
the default for fetch and pull.

Before a new or changed ref from upstream is updated in update_local_ref()
"git rev-list <new-sha1> --not --branches --remotes" is used to determine
all newly fetched commits. These are then walked and diffed against their
parent(s) to see if a submodule has been changed. If that is the case, its
path is stored to be fetched after the superproject fetch is completed.

Using the "--recurse-submodules" or the "--no-recurse-submodules" option
disables the examination of the fetched refs because the result will be
ignored anyway.

There is currently no infrastructure for storing deleted and new
submodules in the .git directory of the superproject. That's why fetch and
pull for now only fetch submodules that are already checked out and are
not renamed.

In t7403 the "--no-recurse-submodules" argument had to be added to "git
pull" to avoid failure because of the moved upstream submodule repo.

Thanks-to: Jonathan Nieder <jrnieder@gmail.com>
Thanks-to: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-09 13:10:35 -08:00
..
howto Documentation/merge subtree How-To: fix typo 2011-02-09 14:03:51 -08:00
pt_BR
RelNotes Git 1.7.4.1 2011-02-11 14:39:55 -08:00
technical Fix typos in the documentation 2011-01-04 11:23:42 -08:00
.gitattributes
.gitignore
asciidoc.conf Merge branch 'jc/maint-doc-em-dash' 2010-09-03 09:43:42 -07:00
blame-options.txt blame-options.txt: Add default value for -M/-C options. 2010-05-07 09:34:59 -07:00
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines Fix typos in the documentation 2011-01-04 11:23:42 -08:00
config.txt Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase 2011-01-24 10:13:59 -08:00
date-formats.txt
diff-format.txt
diff-generate-patch.txt Clarify and extend the "git diff" format documentation 2010-10-19 14:15:30 -07:00
diff-options.txt diff: use "find" instead of "detect" as prefix for long forms of -M and -C 2010-12-10 13:52:05 -08:00
docbook-xsl.css
docbook.xsl Documentation: set a !DOCTYPE for user manual 2010-08-20 10:53:56 -07:00
everyday.txt everyday.txt: change "tracking branch" to "remote-tracking branch" 2010-11-03 09:19:10 -07:00
fetch-options.txt fetch/pull: recurse into submodules when necessary 2011-03-09 13:10:35 -08:00
fix-texi.perl
git-add.txt Fix typos in the documentation 2011-01-04 11:23:42 -08:00
git-am.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-annotate.txt
git-apply.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-archimport.txt Martin Langhoff has a new e-mail address 2010-10-06 12:08:48 -07:00
git-archive.txt Merge branch 'maint-1.7.2' into maint 2011-01-10 10:39:28 -08:00
git-bisect-lk2009.txt Documentation: remove stray backslashes from "Fighting regressions" article 2010-08-20 14:16:51 -07:00
git-bisect.txt
git-blame.txt blame: Add option to show author email instead of name 2010-10-19 12:00:28 -07:00
git-branch.txt git-branch.txt: mention --set-upstream as a way to change upstream configuration 2010-11-03 09:20:48 -07:00
git-bundle.txt Fix typos in the documentation 2011-01-04 11:23:42 -08:00
git-cat-file.txt Documentation: gitrevisions is in section 7 2010-10-13 19:10:55 -07:00
git-check-attr.txt
git-check-ref-format.txt Documentation: gitrevisions is in section 7 2010-10-13 19:10:55 -07:00
git-checkout-index.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-checkout.txt Change incorrect uses of "remote branch" meaning "remote-tracking" 2010-11-03 09:20:47 -07:00
git-cherry-pick.txt cherry-pick/revert: add support for -X/--strategy-option 2010-12-28 11:27:56 -08:00
git-cherry.txt
git-citool.txt
git-clean.txt Add -e/--exclude to git-clean. 2010-07-20 16:52:53 -07:00
git-clone.txt Merge branch 'jl/clone-recurse-sm-synonym' 2010-11-29 17:52:34 -08:00
git-commit-tree.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-commit.txt Documentation: clarify -u<mode> option defaults 2011-02-21 21:48:55 -08:00
git-config.txt
git-count-objects.txt
git-cvsexportcommit.txt Martin Langhoff has a new e-mail address 2010-10-06 12:08:48 -07:00
git-cvsimport.txt Documentation: spelling fixes 2010-07-20 16:59:17 -07:00
git-cvsserver.txt Martin Langhoff has a new e-mail address 2010-10-06 12:08:48 -07:00
git-daemon.txt daemon: make --inetd and --detach incompatible 2010-11-04 16:53:52 -07:00
git-describe.txt Change incorrect uses of "remote branch" meaning "remote-tracking" 2010-11-03 09:20:47 -07:00
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt diff: support --cached on unborn branches 2011-02-07 15:04:30 -08:00
git-difftool.txt Merge branch 'maint' 2010-12-16 16:36:03 -08:00
git-fast-export.txt Use angles for placeholders consistently 2010-10-08 12:29:52 -07:00
git-fast-import.txt Merge branch 'rr/fi-import-marks-if-exists' 2011-02-09 16:41:16 -08:00
git-fetch-pack.txt
git-fetch.txt Change "tracking branch" to "remote-tracking branch" 2010-11-03 09:20:41 -07:00
git-filter-branch.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-fmt-merge-msg.txt Fix typos in the documentation 2011-01-04 11:23:42 -08:00
git-for-each-ref.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-format-patch.txt Merge branch 'maint' 2010-10-13 20:20:09 -07:00
git-fsck-objects.txt
git-fsck.txt fsck docs: remove outdated and useless diagnostic 2010-12-18 22:58:40 -08:00
git-gc.txt Merge branch 'maint' 2010-12-19 17:49:42 -08:00
git-get-tar-commit-id.txt
git-grep.txt Documentation: add missing quotes to "git grep" examples 2010-08-20 14:16:21 -07:00
git-gui.txt
git-hash-object.txt Documentation: spelling fixes 2010-07-20 16:59:17 -07:00
git-help.txt Work around em-dash handling in newer AsciiDoc 2010-08-24 09:48:20 -07:00
git-http-backend.txt Documentation: Clarify support for smart HTTP backend 2010-03-30 16:49:19 -07:00
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt Merge branch 'rr/imap-send-unconfuse-from-line' 2010-04-03 12:28:42 -07:00
git-index-pack.txt Use angles for placeholders consistently 2010-10-08 12:29:52 -07:00
git-init-db.txt
git-init.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-instaweb.txt Merge branch 'jc/maint-doc-em-dash' 2010-09-03 09:43:42 -07:00
git-log.txt Replace "remote tracking" with "remote-tracking" 2010-11-03 09:19:04 -07:00
git-lost-found.txt
git-ls-files.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-ls-remote.txt
git-ls-tree.txt Use angles for placeholders consistently 2010-10-08 12:29:52 -07:00
git-mailinfo.txt git-mailinfo documentation: clarify -u/--encoding 2010-06-13 20:18:23 -07:00
git-mailsplit.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-merge-base.txt merge-base --independent to print reduced parent list in a merge 2010-08-18 14:02:03 -07:00
git-merge-file.txt
git-merge-index.txt Documentation: remove backslashes in manpage synopses 2010-08-20 14:16:22 -07:00
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt Merge branch 'jh/notes-merge' 2010-12-08 11:24:12 -08:00
git-mergetool--lib.txt Work around em-dash handling in newer AsciiDoc 2010-08-24 09:48:20 -07:00
git-mergetool.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-mktag.txt
git-mktree.txt
git-mv.txt
git-name-rev.txt
git-notes.txt Provide 'git notes get-ref' to easily retrieve current notes ref 2010-11-17 13:23:55 -08:00
git-pack-objects.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-pack-redundant.txt
git-pack-refs.txt
git-parse-remote.txt
git-patch-id.txt
git-peek-remote.txt
git-prune-packed.txt
git-prune.txt prune: allow --dry-run for -n and --verbose for -v 2010-08-09 10:13:18 -07:00
git-pull.txt pull: Document the "--[no-]recurse-submodules" options 2011-02-07 15:19:09 -08:00
git-push.txt Documentation: gitrevisions is in section 7 2010-10-13 19:10:55 -07:00
git-quiltimport.txt
git-read-tree.txt Merge branch 'nd/maint-fix-add-typo-detection' 2010-12-22 14:40:26 -08:00
git-rebase.txt rebase: support --verify 2010-11-23 12:15:43 -08:00
git-receive-pack.txt
git-reflog.txt Documentation: gitrevisions is in section 7 2010-10-13 19:10:55 -07:00
git-relink.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-remote-ext.txt Fix typos in the documentation 2011-01-04 11:23:42 -08:00
git-remote-fd.txt Fix typos in the documentation 2011-01-04 11:23:42 -08:00
git-remote-helpers.txt Documentation/remote-helpers: Fix typos and improve language 2010-04-18 13:56:29 -07:00
git-remote.txt Change "tracking branch" to "remote-tracking branch" 2010-11-03 09:20:41 -07:00
git-repack.txt Merge branch 'jk/repack-reuse-object' into maint 2010-11-24 12:45:07 -08:00
git-replace.txt
git-repo-config.txt
git-request-pull.txt request-pull.txt: Document -p option 2010-07-25 21:52:19 -07:00
git-rerere.txt rerere.txt: Document forget subcommand 2010-07-05 11:51:20 -07:00
git-reset.txt Documentation: do not treat reset --keep as a special case 2011-01-21 12:41:14 -08:00
git-rev-list.txt Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
git-rev-parse.txt git-rev-parse.txt: clarify --git-dir 2010-11-29 13:26:00 -08:00
git-revert.txt cherry-pick/revert: add support for -X/--strategy-option 2010-12-28 11:27:56 -08:00
git-rm.txt git-rm.txt: Fix quoting 2010-12-07 13:13:21 -08:00
git-send-email.txt Merge branch 'maint' 2010-12-10 16:36:53 -08:00
git-send-pack.txt
git-sh-setup.txt
git-shell.txt shell: Rewrite documentation and improve error message 2010-08-24 10:47:21 -07:00
git-shortlog.txt Remove stray quotes in --pretty and --format documentation 2010-10-08 12:31:07 -07:00
git-show-branch.txt Merge branch 'sn/doc-opt-notation' into maint 2010-10-21 16:26:42 -07:00
git-show-index.txt
git-show-ref.txt git-show-ref.txt: clarify the pattern matching 2010-10-19 14:15:30 -07:00
git-show.txt Documentation: document show -s 2010-11-09 09:42:57 -08:00
git-stage.txt
git-stash.txt detached-stash: update Documentation 2010-08-21 23:51:22 -07:00
git-status.txt Documentation: clarify -u<mode> option defaults 2011-02-21 21:48:55 -08:00
git-stripspace.txt
git-submodule.txt git submodule add: Remove old docs about implicit -f 2010-07-19 11:11:07 -07:00
git-svn.txt git svn: fix the final example in man page 2011-01-07 21:50:11 +00:00
git-symbolic-ref.txt
git-tag.txt git-tag.txt: list all modes in the description 2011-02-15 10:51:08 -08:00
git-tar-tree.txt
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt Merge branch 'sn/doc-opt-notation' into maint 2010-10-21 16:26:42 -07:00
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt
git-var.txt
git-verify-pack.txt
git-verify-tag.txt verify-tag: document --verbose 2010-11-15 10:05:54 -08:00
git-web--browse.txt web--browse: better support for chromium 2010-12-03 14:05:32 -08:00
git-whatchanged.txt
git-write-tree.txt
git.txt Git 1.7.4.1 2011-02-11 14:39:55 -08:00
gitattributes.txt Merge branch 'jn/perl-funcname' 2011-01-13 11:38:05 -08:00
gitcli.txt
gitcore-tutorial.txt Documentation: gitrevisions is in section 7 2010-10-13 19:10:55 -07:00
gitcvs-migration.txt
gitdiffcore.txt gitdiffcore doc: update pickaxe description 2010-08-31 14:28:20 -07:00
gitglossary.txt
githooks.txt Documentation/githooks: post-rewrite-copy-notes never existed 2011-01-10 09:09:02 -08:00
gitignore.txt Documentation: point to related commands from gitignore 2010-11-11 10:57:16 -08:00
gitk.txt Documentation: gitrevisions is in section 7 2010-10-13 19:10:55 -07:00
gitmodules.txt Fix typos in the documentation 2011-01-04 11:23:42 -08:00
gitrepository-layout.txt Documentation: spelling fixes 2010-07-20 16:59:17 -07:00
gitrevisions.txt Documentation: gitrevisions 2010-07-05 13:39:02 -07:00
gittutorial-2.txt Better "Changed but not updated" message in git-status 2010-11-03 09:18:58 -07:00
gittutorial.txt Change remote tracking to remote-tracking in non-trivial places 2010-11-03 09:19:08 -07:00
gitworkflows.txt
glossary-content.txt Change "tracking branch" to "remote-tracking branch" 2010-11-03 09:20:41 -07:00
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh install-webdoc: keep installed RelNotes-*.txt 2010-09-09 16:17:59 -07:00
mailmap.txt
Makefile docs: default to more modern toolset 2010-11-24 15:13:58 -08:00
manpage-1.72.xsl
manpage-base-url.xsl.in
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage-suppress-sp.xsl
merge-config.txt Fix typos in the documentation 2011-01-04 11:23:42 -08:00
merge-options.txt merge: Make '--log' an integer option for number of shortlog entries 2010-09-09 11:39:20 -07:00
merge-strategies.txt Merge branch 'kb/merge-recursive-rename-threshold' 2010-10-26 21:54:04 -07:00
pretty-formats.txt pretty: Introduce ' ' modifier to add space if non-empty 2010-06-16 14:45:09 -07:00
pretty-options.txt Remove stray quotes in --pretty and --format documentation 2010-10-08 12:31:07 -07:00
pull-fetch-param.txt
rev-list-options.txt Merge branch 'mm/phrase-remote-tracking' 2010-11-24 15:55:05 -08:00
revisions.txt Merge branch 'nd/oneline-sha1-name-from-specific-ref' 2010-12-21 14:30:19 -08:00
SubmittingPatches SubmittingPatches: Document some extra tags used in commit messages 2010-10-06 13:45:42 -07:00
urls-remotes.txt
urls.txt Documentation: spelling fixes 2010-07-20 16:59:17 -07:00
user-manual.conf
user-manual.txt user-manual: remote-tracking can be checked out, with detached HEAD 2010-11-03 09:20:48 -07:00