<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/submodule.h, branch v2.12.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.12.0</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.12.0'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2017-01-31T21:14:56Z</updated>
<entry>
<title>Merge branch 'bw/push-submodule-only'</title>
<updated>2017-01-31T21:14:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-31T21:14:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=792e22e3fd99f204be11b0ff173f2d991308dca5'/>
<id>urn:sha1:792e22e3fd99f204be11b0ff173f2d991308dca5</id>
<content type='text'>
"git submodule push" learned "--recurse-submodules=only option to
push submodules out without pushing the top-level superproject.

* bw/push-submodule-only:
  push: add option to push only submodules
  submodules: add RECURSE_SUBMODULES_ONLY value
  transport: reformat flag #defines to be more readable
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-rm-absorb'</title>
<updated>2017-01-18T23:12:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-18T23:12:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3ccd681c2ab11522591be8a7a3eddb1a85a43ab0'/>
<id>urn:sha1:3ccd681c2ab11522591be8a7a3eddb1a85a43ab0</id>
<content type='text'>
"git rm" used to refuse to remove a submodule when it has its own
git repository embedded in its working tree.  It learned to move
the repository away to $GIT_DIR/modules/ of the superproject
instead, and allow the submodule to be deleted (as long as there
will be no loss of local modifications, that is).

* sb/submodule-rm-absorb:
  rm: absorb a submodules git dir before deletion
  submodule: rename and add flags to ok_to_remove_submodule
  submodule: modernize ok_to_remove_submodule to use argv_array
  submodule.h: add extern keyword to functions
</content>
</entry>
<entry>
<title>Merge branch 'bw/grep-recurse-submodules'</title>
<updated>2017-01-18T23:12:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-18T23:12:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=55d128ae06b7b82f867961b677984620612a201c'/>
<id>urn:sha1:55d128ae06b7b82f867961b677984620612a201c</id>
<content type='text'>
"git grep" has been taught to optionally recurse into submodules.

* bw/grep-recurse-submodules:
  grep: search history of moved submodules
  grep: enable recurse-submodules to work on &lt;tree&gt; objects
  grep: optionally recurse into submodules
  grep: add submodules as a grep source type
  submodules: load gitmodules file from commit sha1
  submodules: add helper to determine if a submodule is initialized
  submodules: add helper to determine if a submodule is populated
  real_path: canonicalize directory separators in root parts
  real_path: have callers use real_pathdup and strbuf_realpath
  real_path: create real_pathdup
  real_path: convert real_path_internal to strbuf_realpath
  real_path: resolve symlinks by hand
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-embed-gitdir'</title>
<updated>2017-01-10T23:24:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-10T23:24:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=da2b74eeec0b12d7b20d34a5e284295f81ad40a8'/>
<id>urn:sha1:da2b74eeec0b12d7b20d34a5e284295f81ad40a8</id>
<content type='text'>
A new submodule helper "git submodule embedgitdirs" to make it
easier to move embedded .git/ directory for submodules in a
superproject to .git/modules/ (and point the latter with the former
that is turned into a "gitdir:" file) has been added.

* sb/submodule-embed-gitdir:
  worktree: initialize return value for submodule_uses_worktrees
  submodule: add absorb-git-dir function
  move connect_work_tree_and_git_dir to dir.h
  worktree: check if a submodule uses worktrees
  test-lib-functions.sh: teach test_commit -C &lt;dir&gt;
  submodule helper: support super prefix
  submodule: use absolute path for computing relative path connecting
</content>
</entry>
<entry>
<title>submodule: rename and add flags to ok_to_remove_submodule</title>
<updated>2016-12-27T22:19:35Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-12-20T23:20:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=83b7696605dbea3eb4e878cf904159f398345aa9'/>
<id>urn:sha1:83b7696605dbea3eb4e878cf904159f398345aa9</id>
<content type='text'>
In different contexts the question "Is it ok to delete a submodule?"
may be answered differently.

In 293ab15eea (submodule: teach rm to remove submodules unless they
contain a git directory, 2012-09-26) a case was made that we can safely
ignore ignored untracked files for removal as we explicitely ask for the
removal of the submodule.

In a later patch we want to remove submodules even when the user doesn't
explicitly ask for it (e.g. checking out a tree-ish in which the submodule
doesn't exist).  In that case we want to be more careful when it comes
to deletion of untracked files. As of this patch it is unclear how this
will be implemented exactly, so we'll offer flags in which the caller
can specify how the different untracked files ought to be handled.

As the flags allow the function to not die on an error when spawning
a child process, we need to find an appropriate return code for the
case when the child process could not be started. As in that case we
cannot tell if the submodule is ok to remove, we'd want to return 'false'.

As only 0 is understood as false, rename the function to invert the
meaning, i.e. the return code of 0 signals the removal of the submodule
is fine, and other values can be used to return a more precise answer
what went wrong.

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.h: add extern keyword to functions</title>
<updated>2016-12-27T22:19:35Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-12-20T23:20:09Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=bd26756112c0b9394f0aea0a77e7f713ffb0cd00'/>
<id>urn:sha1:bd26756112c0b9394f0aea0a77e7f713ffb0cd00</id>
<content type='text'>
As the upcoming series will add a lot of functions to the submodule
header, let's first make the header consistent to the rest of the project
by adding the extern keyword to functions.

As per the CodingGuidelines we try to stay below 80 characters per line,
so adapt all those functions to stay below 80 characters that are already
using more than one line.  Those function using just one line are better
kept in one line than breaking them up into multiple lines just for the
goal of staying below the character limit as it makes grepping
for functions easier if they are one liners.

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>submodules: load gitmodules file from commit sha1</title>
<updated>2016-12-22T19:47:33Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2016-12-16T19:03:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9ebf689aad72bfc091da21e1d73a05308f1ace85'/>
<id>urn:sha1:9ebf689aad72bfc091da21e1d73a05308f1ace85</id>
<content type='text'>
teach submodules to load a '.gitmodules' file from a commit sha1.  This
enables the population of the submodule_cache to be based on the state
of the '.gitmodules' file from a particular commit.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodules: add helper to determine if a submodule is initialized</title>
<updated>2016-12-22T19:47:33Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2016-12-16T19:03:17Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f9f42560e2911a5eef9a3d463a63cfd48d54dd07'/>
<id>urn:sha1:f9f42560e2911a5eef9a3d463a63cfd48d54dd07</id>
<content type='text'>
Add the `is_submodule_initialized()` helper function to submodules.c.
`is_submodule_initialized()` performs a check to determine if the
submodule at the given path has been initialized.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodules: add helper to determine if a submodule is populated</title>
<updated>2016-12-22T19:47:33Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2016-12-16T19:03:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5688c28d81e9103a234efeedcb0568c2c4dd0bfb'/>
<id>urn:sha1:5688c28d81e9103a234efeedcb0568c2c4dd0bfb</id>
<content type='text'>
Add the `is_submodule_populated()` helper function to submodules.c.
`is_submodule_populated()` performes a check to see if a submodule has
been checkout out (and has a valid .git directory/file) at the given path.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodules: add RECURSE_SUBMODULES_ONLY value</title>
<updated>2016-12-20T20:26:34Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2016-12-19T18:25:32Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6c656c3fe4ba13cdf03ed85c059690653fd376cb'/>
<id>urn:sha1:6c656c3fe4ba13cdf03ed85c059690653fd376cb</id>
<content type='text'>
Add the `RECURSE_SUBMODULES_ONLY` enum value to submodule.h.  This enum
value will be used in a later patch to push to indicate that only
submodules should be pushed, while the superproject should remain
unpushed.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
