1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-08 10:13:18 +01:00
git/Documentation
Heiko Voigt 959b5455d0 submodule: implement a config API for lookup of .gitmodules values
In a superproject some commands need to interact with submodules. They
need to query values from the .gitmodules file either from the worktree
of from certain revisions. At the moment this is quite hard since a
caller would need to read the .gitmodules file from the history and then
parse the values. We want to provide an API for this so we have one
place to get values from .gitmodules from any revision (including the
worktree).

The API is realized as a cache which allows us to lazily read
.gitmodules configurations by commit into a runtime cache which can then
be used to easily lookup values from it. Currently only the values for
path or name are stored but it can be extended for any value needed.

It is expected that .gitmodules files do not change often between
commits. Thats why we lookup the .gitmodules sha1 from a commit and then
either lookup an already parsed configuration or parse and cache an
unknown one for each sha1. The cache is lazily build on demand for each
requested commit.

This cache can be used for all purposes which need knowledge about
submodule configurations. Example use cases are:

 * Recursive submodule checkout needs to lookup a submodule name from
   its path when a submodule first appears. This needs be done before
   this configuration exists in the worktree.

 * The implementation of submodule support for 'git archive' needs to
   lookup the submodule name to generate the archive when given a
   revision that is not checked out.

 * 'git fetch' when given the --recurse-submodules=on-demand option (or
   configuration) needs to lookup submodule names by path from the
   database rather than reading from the worktree. For new submodule it
   needs to lookup the name from its path to allow cloning new
   submodules into the .git folder so they can be checked out without
   any network interaction when the user does a checkout of that
   revision.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-19 11:43:09 -07:00
..
howto command-list.txt: add the common groups block 2015-05-21 13:03:37 -07:00
RelNotes Sixth batch for 2.5 cycle 2015-06-01 12:47:56 -07:00
technical submodule: implement a config API for lookup of .gitmodules values 2015-08-19 11:43:09 -07:00
.gitattributes
.gitignore
asciidoc.conf
blame-options.txt Sync with 2.3.8 2015-05-11 14:39:28 -07:00
build-docdep.perl
cat-texi.perl
cmd-list.perl command-list: prepare machinery for upcoming "common groups" section 2015-05-21 13:03:37 -07:00
CodingGuidelines Merge branch 'jg/cguide-we-cannot-count' into maint 2015-04-21 12:12:19 -07:00
config.txt Merge branch 'fm/fetch-raw-sha1' 2015-06-01 12:45:19 -07:00
date-formats.txt
diff-config.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
diff-format.txt diff-format doc: a score can follow M for rewrite 2015-01-28 22:22:03 -08:00
diff-generate-patch.txt doc: fix misrendering due to `single quote' 2015-05-12 22:13:39 -07:00
diff-options.txt Merge branch 'mm/log-format-raw-doc' 2015-06-01 12:45:18 -07:00
docbook-xsl.css
docbook.xsl
everyday.txto doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
fetch-options.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
fix-texi.perl
git-add.txt Merge branch 'jk/asciidoc-markup-fix' 2015-05-22 12:41:50 -07:00
git-am.txt Merge branch 'mm/am-c-doc' into maint 2015-03-06 14:57:56 -08:00
git-annotate.txt
git-apply.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-archimport.txt
git-archive.txt
git-bisect-lk2009.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-bisect.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-blame.txt
git-branch.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-bundle.txt
git-cat-file.txt Merge branch 'dt/cat-file-follow-symlinks' 2015-06-01 12:45:16 -07:00
git-check-attr.txt
git-check-ignore.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt Merge branch 'nd/multiple-work-trees' 2015-05-11 14:23:39 -07:00
git-cherry-pick.txt cherry-pick: fix docs describing handling of empty commits 2015-03-30 21:49:51 -07:00
git-cherry.txt
git-citool.txt
git-clean.txt Merge branch 'mr/doc-clean-f-f' into maint 2015-03-13 22:56:12 -07:00
git-clone.txt clone: --dissociate option to mark that reference is only temporary 2014-10-15 14:34:45 -07:00
git-column.txt
git-commit-tree.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-commit.txt Merge branch 'mc/commit-doc-grammofix' 2015-06-01 12:45:13 -07:00
git-config.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-count-objects.txt
git-credential-cache--daemon.txt credential-cache: close stderr in daemon process 2014-09-16 11:11:58 -07:00
git-credential-cache.txt
git-credential-store.txt git-credential-store: support XDG_CONFIG_HOME 2015-03-24 08:08:02 -07:00
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-cvsserver.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-daemon.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-describe.txt
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt
git-difftool.txt difftool: add support for --trust-exit-code 2014-10-28 10:36:57 -07:00
git-fast-export.txt doc: convert \--option to --option 2015-05-12 22:14:46 -07:00
git-fast-import.txt doc: convert \--option to --option 2015-05-12 22:14:46 -07:00
git-fetch-pack.txt doc: convert \--option to --option 2015-05-12 22:14:46 -07:00
git-fetch.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-filter-branch.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-fmt-merge-msg.txt
git-for-each-ref.txt
git-format-patch.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-fsck-objects.txt
git-fsck.txt
git-gc.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-get-tar-commit-id.txt
git-grep.txt
git-gui.txt
git-hash-object.txt git-hash-object.txt: document --literally option 2015-05-04 14:19:23 -07:00
git-help.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-http-backend.txt Merge branch 'jk/http-backend-deadlock' 2015-06-01 12:45:09 -07:00
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt imap-send: use cURL automatically when NO_OPENSSL defined 2015-03-10 15:19:05 -07:00
git-index-pack.txt
git-init-db.txt
git-init.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-instaweb.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-interpret-trailers.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-log.txt Sync with 2.3.8 2015-05-11 14:39:28 -07:00
git-ls-files.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-ls-remote.txt
git-ls-tree.txt
git-mailinfo.txt git-mailinfo: add --message-id 2014-11-25 15:24:55 -08:00
git-mailsplit.txt
git-merge-base.txt
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt Merge branch 'jc/merge' 2015-05-19 13:17:57 -07:00
git-mergetool--lib.txt
git-mergetool.txt
git-mktag.txt
git-mktree.txt
git-mv.txt
git-name-rev.txt
git-notes.txt builtin/notes: add --allow-empty, to allow storing empty notes 2014-11-12 11:00:11 -08:00
git-p4.txt git-p4: use -m when running p4 changes 2015-04-20 12:36:00 -07:00
git-pack-objects.txt doc: convert \--option to --option 2015-05-12 22:14:46 -07:00
git-pack-redundant.txt
git-pack-refs.txt
git-parse-remote.txt
git-patch-id.txt patch-id: make it stable against hunk reordering 2014-06-10 13:09:24 -07:00
git-prune-packed.txt Documentation: adjust document title underlining 2014-10-13 13:35:18 -07:00
git-prune.txt prune: strategies for linked checkouts 2014-12-01 11:00:17 -08:00
git-pull.txt Merge branch 'ss/pull-rebase-preserve' 2015-03-28 09:37:52 -07:00
git-push.txt Merge branch 'jk/asciidoc-markup-fix' 2015-05-22 12:41:50 -07:00
git-quiltimport.txt Documentation: adjust document title underlining 2014-10-13 13:35:18 -07:00
git-read-tree.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-rebase.txt Merge branch 'jk/asciidoc-markup-fix' 2015-05-22 12:41:50 -07:00
git-receive-pack.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-reflog.txt reflog_expire(): ignore --updateref for symbolic references 2015-03-05 12:35:37 -08:00
git-relink.txt
git-remote-ext.txt doc: add some crossrefs between manual pages 2014-11-11 14:47:04 -08:00
git-remote-fd.txt doc: add some crossrefs between manual pages 2014-11-11 14:47:04 -08:00
git-remote-helpers.txto
git-remote-testgit.txt
git-remote.txt Merge branch 'mg/doc-remote-tags-or-not' into maint 2015-03-13 22:56:05 -07:00
git-repack.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-replace.txt Merge branch 'cc/replace-graft' 2014-07-27 15:14:18 -07:00
git-request-pull.txt
git-rerere.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-reset.txt
git-rev-list.txt doc: convert \--option to --option 2015-05-12 22:14:46 -07:00
git-rev-parse.txt Merge branch 'jk/asciidoc-markup-fix' 2015-05-22 12:41:50 -07:00
git-revert.txt
git-rm.txt
git-send-email.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
git-send-pack.txt Merge branch 'jk/asciidoc-markup-fix' 2015-05-22 12:41:50 -07:00
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt
git-shortlog.txt
git-show-branch.txt
git-show-index.txt
git-show-ref.txt
git-show.txt doc: convert \--option to --option 2015-05-12 22:14:46 -07:00
git-stage.txt Documentation: adjust document title underlining 2014-10-13 13:35:18 -07:00
git-stash.txt
git-status.txt Merge branch 'nd/untracked-cache' 2015-05-26 13:24:46 -07:00
git-stripspace.txt Merge branch 'jk/stripspace-asciidoctor-fix' 2015-05-22 12:41:49 -07:00
git-submodule.txt submodule: improve documentation of update subcommand 2015-03-02 14:59:55 -08:00
git-svn.txt doc: put example URLs and emails inside literal backticks 2015-05-12 22:14:46 -07:00
git-symbolic-ref.txt
git-tag.txt Merge branch 'jk/asciidoc-markup-fix' 2015-05-22 12:41:50 -07:00
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt doc: fix inconsistent spelling of "packfile" 2015-05-22 09:00:17 -07:00
git-update-index.txt update-index: test the system before enabling untracked cache 2015-03-12 13:45:18 -07:00
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt
git-var.txt
git-verify-commit.txt verify-commit: scriptable commit signature verification 2014-06-23 15:50:31 -07:00
git-verify-pack.txt git-verify-pack.txt: fix inconsistent spelling of "packfile" 2015-05-17 11:24:57 -07:00
git-verify-tag.txt
git-web--browse.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-whatchanged.txt
git-write-tree.txt
git.txt Sync with 2.4.2 2015-05-26 13:50:51 -07:00
gitattributes.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
gitcli.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
gitcore-tutorial.txt Merge branch 'ja/tutorial-asciidoctor-fix' 2015-05-22 12:41:48 -07:00
gitcredentials.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
gitcvs-migration.txt doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
gitdiffcore.txt doc: convert \--option to --option 2015-05-12 22:14:46 -07:00
giteveryday.txt doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
gitglossary.txt doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
githooks.txt receive-pack: support push-to-checkout hook 2015-01-08 14:28:43 -08:00
gitignore.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
gitk.txt Documentation: change -L:<regex> to -L:<funcname> 2015-04-20 11:05:50 -07:00
gitmodules.txt submodule: improve documentation of update subcommand 2015-03-02 14:59:55 -08:00
gitnamespaces.txt
gitremote-helpers.txt doc: drop backslash quoting of some curly braces 2015-05-12 22:14:46 -07:00
gitrepository-layout.txt git-common-dir: make "modules/" per-working-directory directory 2014-12-01 11:00:19 -08:00
gitrevisions.txt
gittutorial-2.txt Merge branch 'sn/tutorial-status-output-example' 2014-11-19 13:47:59 -08:00
gittutorial.txt Merge branch 'sn/tutorial-status-output-example' 2014-11-19 13:47:59 -08:00
gitweb.conf.txt Merge branch 'jz/gitweb-conf-doc-fix' into maint 2015-04-21 12:12:22 -07:00
gitweb.txt
gitworkflows.txt
glossary-content.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt Documentation: change -L:<regex> to -L:<funcname> 2015-04-20 11:05:50 -07:00
mailmap.txt
Makefile Documentation: fix version numbering 2015-01-22 13:44:14 -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 *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00
merge-options.txt
merge-strategies.txt
pretty-formats.txt Merge branch 'mm/log-format-raw-doc' 2015-06-01 12:45:18 -07:00
pretty-options.txt "log --pretty" documentation: do not forget "tformat:" 2015-01-15 17:38:58 -08:00
pull-fetch-param.txt docs: Explain the purpose of fetch's and pull's <refspec> parameter. 2014-06-12 09:59:13 -07:00
rev-list-options.txt Merge branch 'mg/show-notes-doc' 2015-04-28 13:00:20 -07:00
revisions.txt
sequencer.txt
SubmittingPatches Merge branch 'jc/submitting-patches-mention-send-email' into maint 2015-03-28 09:33:10 -07:00
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt *config.txt: stick to camelCase naming convention 2015-03-13 22:13:46 -07:00