<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/submodule.h, branch v2.8.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.8.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.8.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-01-12T23:16:54Z</updated>
<entry>
<title>Merge branch 'sb/submodule-parallel-fetch'</title>
<updated>2016-01-12T23:16:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-01-12T23:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=187c0d3d9e63f7d84d7055372f07bedb52849f06'/>
<id>urn:sha1:187c0d3d9e63f7d84d7055372f07bedb52849f06</id>
<content type='text'>
Add a framework to spawn a group of processes in parallel, and use
it to run "git fetch --recurse-submodules" in parallel.

Rerolled and this seems to be a lot cleaner.  The merge of the
earlier one to 'next' has been reverted.

* sb/submodule-parallel-fetch:
  submodules: allow parallel fetching, add tests and documentation
  fetch_populated_submodules: use new parallel job processing
  run-command: add an asynchronous parallel child processor
  sigchain: add command to pop all common signals
  strbuf: add strbuf_read_once to read without blocking
  xread: poll on non blocking fds
  submodule.c: write "Fetching submodule &lt;foo&gt;" to stderr
</content>
</entry>
<entry>
<title>submodules: allow parallel fetching, add tests and documentation</title>
<updated>2015-12-16T20:06:08Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-12-16T00:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=62104ba14af4845c6c1ba1dab05fad4a289d806f'/>
<id>urn:sha1:62104ba14af4845c6c1ba1dab05fad4a289d806f</id>
<content type='text'>
This enables the work of the previous patches.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: add recurseSubmodules config option</title>
<updated>2015-11-20T13:02:07Z</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2015-11-17T11:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b33a15b08131514b593015cb3e719faf9db20208'/>
<id>urn:sha1:b33a15b08131514b593015cb3e719faf9db20208</id>
<content type='text'>
The --recurse-submodules command line parameter has existed for some
time but it has no config file equivalent.

Following the style of the corresponding parameter for git fetch, let's
invent push.recurseSubmodules to provide a default for this
parameter. This also requires the addition of --recurse-submodules=no to
allow the configuration to be overridden on the command line when
required.

The most straightforward way to implement this appears to be to make
push use code in submodule-config in a similar way to fetch.

Signed-off-by: Mike Crowe &lt;mac@mcrowe.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>submodule: allow erroneous values for the fetchRecurseSubmodules option</title>
<updated>2015-08-19T18:43:10Z</updated>
<author>
<name>Heiko Voigt</name>
<email>hvoigt@hvoigt.net</email>
</author>
<published>2015-08-18T00:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=027771fcb153e0003bcb2d68e1838594a48b0161'/>
<id>urn:sha1:027771fcb153e0003bcb2d68e1838594a48b0161</id>
<content type='text'>
We should not die when reading the submodule config cache since the
user might not be able to get out of that situation when the
configuration is part of the history.

We should handle this condition later when the value is about to be
used.

Signed-off-by: Heiko Voigt &lt;hvoigt@hvoigt.net&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: use new config API for worktree configurations</title>
<updated>2015-08-19T18:43:10Z</updated>
<author>
<name>Heiko Voigt</name>
<email>hvoigt@hvoigt.net</email>
</author>
<published>2015-08-18T00:21:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=851e18c3859ad0f9f7e91fdb4d6cce5a8272420b'/>
<id>urn:sha1:851e18c3859ad0f9f7e91fdb4d6cce5a8272420b</id>
<content type='text'>
We remove the extracted functions and directly parse into and read out
of the cache. This allows us to have one unified way of accessing
submodule configuration values specific to single submodules. Regardless
whether we need to access a configuration from history or from the
worktree.

Signed-off-by: Heiko Voigt &lt;hvoigt@hvoigt.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: implement a config API for lookup of .gitmodules values</title>
<updated>2015-08-19T18:43:09Z</updated>
<author>
<name>Heiko Voigt</name>
<email>hvoigt@hvoigt.net</email>
</author>
<published>2015-08-18T00:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=959b5455d07c7724eea9d323ca8ce6bb6ddde40e'/>
<id>urn:sha1:959b5455d07c7724eea9d323ca8ce6bb6ddde40e</id>
<content type='text'>
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 &lt;hvoigt@hvoigt.net&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rm: delete .gitmodules entry of submodules removed from the work tree</title>
<updated>2013-08-06T21:11:00Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2013-08-06T19:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=95c16418f0375e2fc325f32c3d7578fba9cfd7ef'/>
<id>urn:sha1:95c16418f0375e2fc325f32c3d7578fba9cfd7ef</id>
<content type='text'>
Currently using "git rm" on a submodule removes the submodule's work tree
from that of the superproject and the gitlink from the index. But the
submodule's section in .gitmodules is left untouched, which is a leftover
of the now removed submodule and might irritate users (as opposed to the
setting in .git/config, this must stay as a reminder that the user showed
interest in this submodule so it will be repopulated later when an older
commit is checked out).

Let "git rm" help the user by not only removing the submodule from the
work tree but by also removing the "submodule.&lt;submodule name&gt;" section
from the .gitmodules file and stage both. This doesn't happen when the
"--cached" option is used, as it would modify the work tree. This also
silently does nothing when no .gitmodules file is found and only issues a
warning when it doesn't have a section for this submodule. This is because
the user might just use plain gitlinks without the .gitmodules file or has
already removed the section by hand before issuing the "git rm" command
(in which case the warning reminds him that rm would have done that for
him). Only when .gitmodules is found and contains merge conflicts the rm
command will fail and tell the user to resolve the conflict before trying
again.

Also extend the man page to inform the user about this new feature. While
at it promote the submodule sub-section to a chapter as it made not much
sense under "REMOVING FILES THAT HAVE DISAPPEARED FROM THE FILESYSTEM".

In t7610 three uses of "git rm submod" had to be replaced with "git rm
--cached submod" because that test expects .gitmodules and the work tree
to stay untouched. Also in t7400 the tests for the remaining settings in
the .gitmodules file had to be changed to assert that these settings are
missing.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mv: update the path entry in .gitmodules for moved submodules</title>
<updated>2013-08-06T21:10:35Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2013-08-06T19:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0656781fadca17cc51fb1c30f265c251ebe12819'/>
<id>urn:sha1:0656781fadca17cc51fb1c30f265c251ebe12819</id>
<content type='text'>
Currently using "git mv" on a submodule moves the submodule's work tree in
that of the superproject. But the submodule's path setting in .gitmodules
is left untouched, which is now inconsistent with the work tree and makes
git commands that rely on the proper path -&gt; name mapping (like status and
diff) behave strangely.

Let "git mv" help here by not only moving the submodule's work tree but
also updating the "submodule.&lt;submodule name&gt;.path" setting from the
.gitmodules file and stage both. This doesn't happen when no .gitmodules
file is found and only issues a warning when it doesn't have a section for
this submodule. This is because the user might just use plain gitlinks
without the .gitmodules file or has already updated the path setting by
hand before issuing the "git mv" command (in which case the warning
reminds him that mv would have done that for him). Only when .gitmodules
is found and contains merge conflicts the mv command will fail and tell
the user to resolve the conflict before trying again.

Also extend the man page to inform the user about this new feature.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule.c: add .gitmodules staging helper functions</title>
<updated>2013-07-30T21:39:56Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2013-07-30T19:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5fee995244e13fd59500425d49038b00499396f8'/>
<id>urn:sha1:5fee995244e13fd59500425d49038b00499396f8</id>
<content type='text'>
Add the new is_staging_gitmodules_ok() and stage_updated_gitmodules()
functions to submodule.c. The first makes it possible for call sites to
see if the .gitmodules file did contain any unstaged modifications they
would accidentally stage in addition to those they intend to stage
themselves. The second function stages all modifications to the
.gitmodules file, both will be used by subsequent patches for the mv
and rm commands.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mv: move submodules using a gitfile</title>
<updated>2013-07-30T20:52:53Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2013-07-30T19:50:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a88c915de9886fe17005a5daff4900ced0ea76ad'/>
<id>urn:sha1:a88c915de9886fe17005a5daff4900ced0ea76ad</id>
<content type='text'>
When moving a submodule which uses a gitfile to point to the git directory
stored in .git/modules/&lt;name&gt; of the superproject two changes must be made
to make the submodule work: the .git file and the core.worktree setting
must be adjusted to point from work tree to git directory and back.

Achieve that by remembering which submodule uses a gitfile by storing the
result of read_gitfile() of each submodule. If that is not NULL the new
function connect_work_tree_and_git_dir() is called after renaming the
submodule's work tree which updates the two settings to the new values.

Extend the man page to inform the user about that feature (and while at it
change the description to not talk about a script anymore, as mv is a
builtin for quite some time now).

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
