<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t7400-submodule-basic.sh, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-07-30T16:16:47Z</updated>
<entry>
<title>t7400: make hash size independent</title>
<updated>2020-07-30T16:16:47Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-07-29T23:14:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c0b65ea8fda9959c6bb4036c7bff22d5e769973c'/>
<id>urn:sha1:c0b65ea8fda9959c6bb4036c7bff22d5e769973c</id>
<content type='text'>
Instead of using cut with hard-coded hash sizes, use cut with fields, or
where that's not possible, sed with $OID_REGEX, so that the tests are
independent of hash size.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t: fix whitespace around &amp;&amp;</title>
<updated>2020-03-22T23:41:05Z</updated>
<author>
<name>Andrei Rybak</name>
<email>rybak.a.v@gmail.com</email>
</author>
<published>2020-03-22T21:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64d1022e14cafa211f84aab9e1a9f7aab8164855'/>
<id>urn:sha1:64d1022e14cafa211f84aab9e1a9f7aab8164855</id>
<content type='text'>
Add missing spaces before '&amp;&amp;' and switch tabs around '&amp;&amp;' to spaces.
Also fix the space after redirection operator in t3701 while we're here.

These issues were found using `git grep '[^ ]&amp;&amp;$'` and
`git grep -P '&amp;&amp;\t' t/`.

Signed-off-by: Andrei Rybak &lt;rybak.a.v@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pk/status-of-uncloned-submodule'</title>
<updated>2020-02-14T20:54:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-14T20:54:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2dcfcc21d233c71e47e2ddae799968a18775a1d'/>
<id>urn:sha1:f2dcfcc21d233c71e47e2ddae799968a18775a1d</id>
<content type='text'>
The way "git submodule status" reports an initialized but not yet
populated submodule has not been reimplemented correctly when a
part of the "git submodule" command was rewritten in C, which has
been corrected.

* pk/status-of-uncloned-submodule:
  t7400: testcase for submodule status on unregistered inner git repos
  submodule: fix status of initialized but not cloned submodules
  t7400: add a testcase for submodule status on empty dirs
</content>
</entry>
<entry>
<title>Merge branch 'hw/advice-add-nothing'</title>
<updated>2020-02-14T20:54:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-14T20:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=daef1b300b07c3d17d47c3bf01ebde28b62ff3fe'/>
<id>urn:sha1:daef1b300b07c3d17d47c3bf01ebde28b62ff3fe</id>
<content type='text'>
Two help messages given when "git add" notices the user gave it
nothing to add have been updated to use advise() API.

* hw/advice-add-nothing:
  add: change advice config variables used by the add API
  add: use advise function to display hints
</content>
</entry>
<entry>
<title>t7400: testcase for submodule status on unregistered inner git repos</title>
<updated>2020-02-04T19:26:22Z</updated>
<author>
<name>Peter Kaestle</name>
<email>peter@piie.net</email>
</author>
<published>2020-02-02T23:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f38c92452d0ad75b1c5c5cfdd04223ad7a9a08a9'/>
<id>urn:sha1:f38c92452d0ad75b1c5c5cfdd04223ad7a9a08a9</id>
<content type='text'>
We have test coverage for "git submodule status" output in
various cases, i.e.

  1) not-init, not-cloned: status should initially be "missing"
  2) init, not-cloned: status should be "missing"
  3) not-init, cloned: status should ignore the inner git-repo
  4) init, cloned: status should be "up-to-date" after update
  4.1) + modified: status should be "modified" after submodule commit
  4.2) + modified, committed: status should be "up-to-date" after update

the case 3) is not covered yet.

Test that submodule status reports an inner git repo as unknown, while
it is not added to the superproject.  This covers case (3).

Signed-off-by: Peter Kaestle &lt;peter@piie.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: fix status of initialized but not cloned submodules</title>
<updated>2020-01-27T18:14:00Z</updated>
<author>
<name>Peter Kaestle</name>
<email>peter.kaestle@nokia.com</email>
</author>
<published>2020-01-24T10:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b2885ec9ba0b1328858231c9f5095e7f85d9f23'/>
<id>urn:sha1:3b2885ec9ba0b1328858231c9f5095e7f85d9f23</id>
<content type='text'>
Original bash helper for "submodule status" was doing a check for
initialized but not cloned submodules and prefixed the status with
a minus sign in case no .git file or folder was found inside the
submodule directory.

This check was missed when the original port of the functionality
from bash to C was done.

Signed-off-by: Peter Kaestle &lt;peter.kaestle@nokia.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t7400: add a testcase for submodule status on empty dirs</title>
<updated>2020-01-27T18:13:32Z</updated>
<author>
<name>Peter Kaestle</name>
<email>peter.kaestle@nokia.com</email>
</author>
<published>2020-01-24T10:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ace912bfb8e0cf85e29cc2d81fd847a96637be36'/>
<id>urn:sha1:ace912bfb8e0cf85e29cc2d81fd847a96637be36</id>
<content type='text'>
We have test coverage for "git submodule status" output in
various cases, i.e.

    1) not-init, not-cloned: status should initially be "missing"
    2) init, not-cloned: status should be "missing"
    3) not-init, cloned:
    4) init, cloned: status should be "up-to-date" after update
    4.1) + modified: status should be "modified" after submodule commit
    4.2) + modified, committed: status should be "up-to-date" after update

but the cases 2) and 3) are not covered.

Test that submodule status reports initialized but not cloned
submodules as missing to fill the gap in test coverage; this covers
case (2) above, but case (3) remains uncovered.

Signed-off-by: Peter Kaestle &lt;peter.kaestle@nokia.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule add: show 'add --dry-run' stderr when aborting</title>
<updated>2020-01-15T18:22:24Z</updated>
<author>
<name>Kyle Meyer</name>
<email>kyle@kyleam.com</email>
</author>
<published>2020-01-08T00:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c81638541cbbf5868e79037ca29b6e37e47461e5'/>
<id>urn:sha1:c81638541cbbf5868e79037ca29b6e37e47461e5</id>
<content type='text'>
Unless --force is specified, 'submodule add' checks if the destination
path is ignored by calling 'git add --dry-run --ignore-missing', and,
if that call fails, aborts with a custom "path is ignored" message (a
slight variant of what 'git add' shows).  Aborting early rather than
letting the downstream 'git add' call fail is done so that the command
exits before cloning into the destination path.  However, in rare
cases where the dry-run call fails for a reason other than the path
being ignored---for example, due to a preexisting index.lock
file---displaying the "ignored path" error message hides the real
source of the failure.

Instead of displaying the tailored "ignored path" message, let's
report the standard error from the dry run to give the caller more
accurate information about failures that are not due to an ignored
path.

For the ignored path case, this leads to the following change in the
error message:

  The following [-path is-]{+paths are+} ignored by one of your .gitignore files:
  &lt;destination path&gt;
  Use -f if you really want to add [-it.-]{+them.+}

The new phrasing is a bit awkward, because 'submodule add' is only
dealing with one destination path.  Alternatively, we could continue
to use the tailored message when the exit code is 1 (the expected
status for a failure due to an ignored path) and relay the standard
error for all other non-zero exits.  That, however, risks hiding the
message of unrelated failures that share an exit code of 1, so it
doesn't seem worth doing just to avoid a clunkier, but still clear,
error message.

Signed-off-by: Kyle Meyer &lt;kyle@kyleam.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mg/submodule-status-from-a-subdirectory'</title>
<updated>2019-12-05T20:52:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-05T20:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88cf80949e0a4c3cacd4be80358e5fe62acbf0ae'/>
<id>urn:sha1:88cf80949e0a4c3cacd4be80358e5fe62acbf0ae</id>
<content type='text'>
"git submodule status" that is run from a subdirectory of the
superproject did not work well, which has been corrected.

* mg/submodule-status-from-a-subdirectory:
  submodule: fix 'submodule status' when called from a subdirectory
</content>
</entry>
<entry>
<title>submodule: fix 'submodule status' when called from a subdirectory</title>
<updated>2019-11-25T05:08:25Z</updated>
<author>
<name>Manish Goregaokar</name>
<email>manishsmail@gmail.com</email>
</author>
<published>2019-11-25T04:15:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f3aea22c781d603d56ce794879a8fe8d8dd77d1'/>
<id>urn:sha1:1f3aea22c781d603d56ce794879a8fe8d8dd77d1</id>
<content type='text'>
When calling `git submodule status` while in a subdirectory, we are
incorrectly not detecting modified submodules and
thus reporting that all of the submodules are unchanged.

This is because the submodule helper is calling `diff-index` with the
submodule path assuming the path is relative to the current prefix
directory, however the submodule path used is actually relative to the root.

Always pass NULL as the `prefix` when running diff-files on the
submodule, to make sure the submodule's path is interpreted as relative
to the superproject's repository root.

Signed-off-by: Manish Goregaokar &lt;manishsmail@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
