<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t7400-submodule-basic.sh, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-06-04T01:20:58Z</updated>
<entry>
<title>Merge branch 'bw/submodule-with-bs-path' into maint</title>
<updated>2017-06-04T01:20:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-04T01:20:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c95f0d2f9d616132db863992959b05545f8578cc'/>
<id>urn:sha1:c95f0d2f9d616132db863992959b05545f8578cc</id>
<content type='text'>
A hotfix to a topic that is already in v2.13.

* bw/submodule-with-bs-path:
  t7400: add !CYGWIN prerequisite to 'add with \\ in path'
</content>
</entry>
<entry>
<title>Merge branch 'jk/submodule-init-segv-fix'</title>
<updated>2017-05-01T05:14:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-05-01T05:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d92dbf1934faad614c31482446d5f32fb9322470'/>
<id>urn:sha1:d92dbf1934faad614c31482446d5f32fb9322470</id>
<content type='text'>
Fix a segv in 'submodule init' when url is not given for a submodule.

* jk/submodule-init-segv-fix:
  submodule_init: die cleanly on submodules without url defined
</content>
</entry>
<entry>
<title>t7400: add !CYGWIN prerequisite to 'add with \\ in path'</title>
<updated>2017-05-01T02:03:46Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsayjones.plus.com</email>
</author>
<published>2017-04-30T17:29:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f1b225153c9e75b805a262feb6796e3bf23dc3d'/>
<id>urn:sha1:7f1b225153c9e75b805a262feb6796e3bf23dc3d</id>
<content type='text'>
Commit cf9e55f494 ("submodule: prevent backslash expantion in submodule
names", 07-04-2017) added a test which creates a git repository with
some backslash characters in the name. On windows, where the backslash
character is a directory separator, it is not possible to create a
repository with the name 'sub\with\backslash'. (The NTFS filesystem would
probably allow it, but the win32 api does not). The MinGW and Git for
Windows versions of git actually create a repository called 'backslash'
in the sub-directory 'sub/with'.

On cygwin, however, due to the slightly schizophrenic treatment of the
backslash character by cygwin-git, this test fails at the 'git init'
stage. The git-init command does not recognise the directory separators
in the input path (eg. is_dir_sep('\\') is false), so it does not
attempt to create the leading directories 'sub/with'. (The call to
mkdir('sub\\with\\backslash') actually does recognise the directory
separators, but fails because the 'sub/with' directory doesn't exist).

In order to suppress the test failure (for now), add the !CYGWIN test
prerequisite.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule_init: die cleanly on submodules without url defined</title>
<updated>2017-04-25T02:00:15Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-04-25T00:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=627fde102515a7807dba89acaa88cb053b38a44a'/>
<id>urn:sha1:627fde102515a7807dba89acaa88cb053b38a44a</id>
<content type='text'>
When we init a submodule, we try to die when it has no URL
defined:

  url = xstrdup(sub-&gt;url);
  if (!url)
	  die(...);

But that's clearly nonsense. xstrdup() will never return
NULL, and if sub-&gt;url is NULL, we'll segfault.

These two bits of code need to be flipped, so we check
sub-&gt;url before looking at it.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: prevent backslash expantion in submodule names</title>
<updated>2017-04-17T03:09:36Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-04-07T17:23:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf9e55f49438d07dd554c5ade92f1c266363af36'/>
<id>urn:sha1:cf9e55f49438d07dd554c5ade92f1c266363af36</id>
<content type='text'>
When attempting to add a submodule with backslashes in its name 'git
submodule' fails in a funny way.  We can see that some of the
backslashes are expanded resulting in a bogus path:

git -C main submodule add ../sub\\with\\backslash
fatal: repository '/tmp/test/sub\witackslash' does not exist
fatal: clone of '/tmp/test/sub\witackslash' into submodule path

To solve this, convert calls to 'read' to 'read -r' in git-submodule.sh
in order to prevent backslash expantion in submodule names.

Reported-by: Joachim Durchholz &lt;jo@durchholz.org&gt;
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule--helper init: set submodule.&lt;name&gt;.active</title>
<updated>2017-03-18T16:51:23Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-17T22:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f8d711548c08e05766e067dc23e5be3b1b72657'/>
<id>urn:sha1:1f8d711548c08e05766e067dc23e5be3b1b72657</id>
<content type='text'>
When initializing a submodule set the submodule.&lt;name&gt;.active config to
true if the module hasn't already been configured to be active by some
other means (e.g. a pathspec set in submodule.active).

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>clone: teach --recurse-submodules to optionally take a pathspec</title>
<updated>2017-03-18T16:51:23Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-17T22:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb62e0a99fcbb9ceb03502bf2168d2e57530214f'/>
<id>urn:sha1:bb62e0a99fcbb9ceb03502bf2168d2e57530214f</id>
<content type='text'>
Teach clone --recurse-submodules to optionally take a pathspec argument
which describes which submodules should be recursively initialized and
cloned.  If no pathspec is provided, --recurse-submodules will
recursively initialize and clone all submodules by using a default
pathspec of ".".  In order to construct more complex pathspecs,
--recurse-submodules can be given multiple times.

This also configures the 'submodule.active' configuration option to be
the given pathspec, such that any future invocation of `git submodule
update` will keep up with the pathspec.

Additionally the switch '--recurse' is removed from the Documentation as
well as marked hidden in the options array, to streamline the options
for submodules.  A simple '--recurse' doesn't convey what is being
recursed, e.g. it could mean directories or trees (c.f. ls-tree) In a
lot of other commands we already have '--recurse-submodules' to mean
recursing into submodules, so advertise this spelling here as the
genuine option.

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>submodule init: initialize active submodules</title>
<updated>2017-03-18T16:51:23Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-17T22:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e7eaed016e6241e96de6a0140923e81cfc387e8'/>
<id>urn:sha1:3e7eaed016e6241e96de6a0140923e81cfc387e8</id>
<content type='text'>
Teach `submodule init` to initialize submodules which have been
configured to be active by setting 'submodule.active' with a pathspec.

Now if no path arguments are given and 'submodule.active' is configured,
`init` will initialize all submodules which have been configured to be
active.  If no path arguments are given and 'submodule.active' is not
configured, then `init` will retain the old behavior of initializing all
submodules.

This allows users to record more complex patterns as it saves retyping
them whenever you invoke update.

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>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>
</feed>
