<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t7400-submodule-basic.sh, branch v2.12.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.12.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.12.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-11-29T22:25:09Z</updated>
<entry>
<title>submodule add: extend force flag to add existing repos</title>
<updated>2016-11-29T22:25:09Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-10-06T19:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=619acfc78c526bc9df17b7704e60d0512ab7a84c'/>
<id>urn:sha1:619acfc78c526bc9df17b7704e60d0512ab7a84c</id>
<content type='text'>
Currently the force flag in `git submodule add` takes care of possibly
ignored files or when a name collision occurs.

However there is another situation where submodule add comes in handy:
When you already have a gitlink recorded, but no configuration was
done (i.e. no .gitmodules file nor any entry in .git/config) and you
want to generate these config entries. For this situation allow
`git submodule add` to proceed if there is already a submodule at the
given path in the index.

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>tests: use test_i18n* functions to suppress false positives</title>
<updated>2016-06-17T22:45:48Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-06-17T20:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1edbaac3bbe1a55cf3450ae7a350b50826d5d283'/>
<id>urn:sha1:1edbaac3bbe1a55cf3450ae7a350b50826d5d283</id>
<content type='text'>
The test functions test_i18ncmp and test_i18ngrep pretend success if run
under GETTEXT_POISON. By using those functions to test output which is
correctly marked as translatable, enables one to detect if the strings
newly marked for translation are from plumbing output. If they are
indeed from plumbing, the test would fail, and the string should be
unmarked, since it is not seen by users.

Thus, it is productive to not have false positives when running the test
under GETTEXT_POISON. This commit replaces normal test functions by
their i18n aware variants in use-cases know to be correctly marked for
translation, suppressing false positives.

Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-deinit-all'</title>
<updated>2016-05-17T21:38:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-17T21:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=21b2e60400754732bd509f393b3368f9fa530602'/>
<id>urn:sha1:21b2e60400754732bd509f393b3368f9fa530602</id>
<content type='text'>
Correct faulty recommendation to use "git submodule deinit ." when
de-initialising all submodules, which would result in a strange
error message in a pathological corner case.

* sb/submodule-deinit-all:
  submodule deinit: require '--all' instead of '.' for all submodules
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-init'</title>
<updated>2016-05-17T21:38:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-17T21:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2c96ceb57afd8c64c3e3e656f9390c95e9fbec9'/>
<id>urn:sha1:f2c96ceb57afd8c64c3e3e656f9390c95e9fbec9</id>
<content type='text'>
Update of "git submodule" to move pieces of logic to C continues.

* sb/submodule-init:
  submodule init: redirect stdout to stderr
  submodule--helper update-clone: abort gracefully on missing .gitmodules
  submodule init: fail gracefully with a missing .gitmodules file
  submodule: port init from shell to C
  submodule: port resolve_relative_url from shell to C
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-module-list-pathspec-fix'</title>
<updated>2016-05-13T20:18:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-13T20:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4f5067010d16937e040039d9aec4b16920f7d210'/>
<id>urn:sha1:4f5067010d16937e040039d9aec4b16920f7d210</id>
<content type='text'>
* sb/submodule-module-list-pathspec-fix:
  submodule deinit test: fix broken &amp;&amp; chain in subshell
</content>
</entry>
<entry>
<title>submodule deinit: require '--all' instead of '.' for all submodules</title>
<updated>2016-05-05T21:51:26Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-05-05T19:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f6a527997743b79d6986a16313a7488cfc53d123'/>
<id>urn:sha1:f6a527997743b79d6986a16313a7488cfc53d123</id>
<content type='text'>
The discussion in [1] pointed out that '.' is a faulty suggestion as
there is a corner case where it fails:

&gt; "submodule deinit ." may have "worked" in the sense that you would
&gt; have at least one path in your tree and avoided this "nothing
&gt; matches" most of the time.  It would have still failed with the
&gt; exactly same error if run in an empty repository, i.e.
&gt;
&gt;        $ E=/var/tmp/x/empty &amp;&amp; rm -fr "$E" &amp;&amp; mkdir -p "$E" &amp;&amp; cd "$E"
&gt;        $ git init
&gt;        $ rungit v2.6.6 submodule deinit .
&gt;        error: pathspec '.' did not match any file(s) known to git.
&gt;        Did you forget to 'git add'?
&gt;        $ &gt;file &amp;&amp; git add file
&gt;        $ rungit v2.6.6 submodule deinit .
&gt;        $ echo $?
&gt;        0

So instead of a pathspec add the '--all' option to deinit all submodules
and add a test to check for the corner case of an empty repository.

The code only needs to learn about the '--all' option and doesn't
require further changes as `git submodule--helper list "$@"` will list
all submodules when "$@" is empty.

[1] http://news.gmane.org/gmane.comp.version-control.git/289535

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule deinit test: fix broken &amp;&amp; chain in subshell</title>
<updated>2016-05-03T16:16:41Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-05-02T22:24:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14544dd215360343d9cc70c3675b9479c871a1ae'/>
<id>urn:sha1:14544dd215360343d9cc70c3675b9479c871a1ae</id>
<content type='text'>
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--helper update-clone: abort gracefully on missing .gitmodules</title>
<updated>2016-04-29T17:07:13Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-04-28T20:02:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08fdbdb153c138f0a2dc85949475fafb20853d96'/>
<id>urn:sha1:08fdbdb153c138f0a2dc85949475fafb20853d96</id>
<content type='text'>
When there is no .gitmodules file availabe to initialize a submodule
from, `submodule_from_path` just returns NULL. We need to check for
that and abort gracefully.

When `git submodule update` was implemented in shell, this error out
with the warning

    Submodule path '%s' not initialized
    Maybe you want to use 'update --init'?

Replicate that behavior for now instead of crashing.

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 init: fail gracefully with a missing .gitmodules file</title>
<updated>2016-04-29T17:05:24Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-04-28T20:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d92028a575dde9c325e23f89c3d2b24f13868c57'/>
<id>urn:sha1:d92028a575dde9c325e23f89c3d2b24f13868c57</id>
<content type='text'>
When there is no .gitmodules file availabe to initialize a submodule
from, `submodule_from_path` just returns NULL. We need to check for
that and abort gracefully. When `submodule init` was implemented in shell,
a missing .gitmodules file would result in an error message

    No url found for submodule path '%s' in .gitmodules

Replicate that error message for now.

When the .gitmodules file is missing we can probably fail even earlier
for all of the submodules with an improved error message.

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>Merge branch 'sb/submodule-helper-clone-regression-fix'</title>
<updated>2016-04-22T22:45:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-04-22T22:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=deef3cdc08eb16354d16da0813585d60d5f34412'/>
<id>urn:sha1:deef3cdc08eb16354d16da0813585d60d5f34412</id>
<content type='text'>
A partial rewrite of "git submodule" in the 2.7 timeframe changed
the way the gitdir: pointer in the submodules point at the real
repository location to use absolute paths by accident.  This has
been corrected.

* sb/submodule-helper-clone-regression-fix:
  submodule--helper, module_clone: catch fprintf failure
  submodule--helper: do not borrow absolute_path() result for too long
  submodule--helper, module_clone: always operate on absolute paths
  submodule--helper clone: create the submodule path just once
  submodule--helper: fix potential NULL-dereference
  recursive submodules: test for relative paths
</content>
</entry>
</feed>
