<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/t/t7400-submodule-basic.sh, branch v1.8.0.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2012-09-30T05:28:33Z</updated>
<entry>
<title>Merge branch 'rr/maint-submodule-unknown-cmd'</title>
<updated>2012-09-30T05:28:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-30T05:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=da5a2bd525400b9106dfdccc61e2079a97589a0d'/>
<id>urn:sha1:da5a2bd525400b9106dfdccc61e2079a97589a0d</id>
<content type='text'>
* rr/maint-submodule-unknown-cmd:
  submodule: if $command was not matched, don't parse other args
</content>
</entry>
<entry>
<title>submodule: if $command was not matched, don't parse other args</title>
<updated>2012-09-25T18:31:48Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2012-09-22T11:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=af9c9f97137dfb3f20a17d76520803c0312fd3e4'/>
<id>urn:sha1:af9c9f97137dfb3f20a17d76520803c0312fd3e4</id>
<content type='text'>
"git submodule" command DWIMs the command line and assumes a
unspecified action word for 'status' action.  This is a UI mistake
that leads to a confusing behaviour.  A mistyped command name is
instead treated as a request for 'status' of the submodule with that
name, e.g.

    $ git submodule show
    error: pathspec 'show' did not match any file(s) known to git.
    Did you forget to 'git add'?

Stop DWIMming an unknown or mistyped subcommand name as pathspec
given to unspelled "status" subcommand.  "git submodule" without any
argument is still interpreted as "git submodule status", but its
value is questionable.

Adjust t7400 to match, and stop advertising the default subcommand
being 'status' which does not help much in practice, other than
promoting laziness and confusion.

Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'hv/submodule-path-unmatch'</title>
<updated>2012-08-29T21:50:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-08-29T21:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1c0fa76be7d7417080a36f8603c7e9c2511509ea'/>
<id>urn:sha1:1c0fa76be7d7417080a36f8603c7e9c2511509ea</id>
<content type='text'>
* hv/submodule-path-unmatch:
  Let submodule command exit with error status if path does not exist
</content>
</entry>
<entry>
<title>Let submodule command exit with error status if path does not exist</title>
<updated>2012-08-14T21:00:17Z</updated>
<author>
<name>Heiko Voigt</name>
<email>hvoigt@hvoigt.net</email>
</author>
<published>2012-08-14T20:35:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=be9d0a3a4cbd736911afc10154c7a541129503bd'/>
<id>urn:sha1:be9d0a3a4cbd736911afc10154c7a541129503bd</id>
<content type='text'>
Various subcommands of the "git submodule" command exited with 0
status even though the path given by the user did not exist.

The reason behind that was that they all pipe the output of
module_list into the while loop which then does the action on the
paths specified by the commandline. Since the exit code of the
command on the upstream side of the pipe is ignored by the shell,
the status code of "ls-files --error-unmatch" nor "module_list" was
not propagated.

In case ls-files returns with an error code, we write a special
string that is not possible in non error situations, and no other
output, so that the downstream can detect the error and die with an
error code.

The error message that there is an unmatched pathspec comes through
stderr directly from ls-files. So the user still gets a hint whats going
on.

Signed-off-by: Heiko Voigt &lt;hvoigt@hvoigt.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t7400: avoid path mangling issues</title>
<updated>2012-06-14T18:00:06Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2012-06-14T12:10:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c517e73d0f116f8293f1fbc7f92bb60ea8047b0f'/>
<id>urn:sha1:c517e73d0f116f8293f1fbc7f92bb60ea8047b0f</id>
<content type='text'>
A recently introduced test uses an absolute path. But when run on Windows
using the MSYS bash, such a path is mangled into a Windows style path when
it is passed to 'git config'. The subsequent 'test' then compares the
mangled path to the unmangled version and reports a failure.

A path beginning with two slashes denotes a network directory
(//server/share path) and is not mangled. Use that trick to side-step the
issue. Just in case that 'git submodule init' regresses in such a way that
it accesses the URL, use a path name that is unlikely to exist on POSIX
systems, and that cannot be a server name on Windows.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: fix handling of superproject origin URLs like foo, ./foo and ./foo/bar</title>
<updated>2012-06-06T18:43:55Z</updated>
<author>
<name>Jon Seymour</name>
<email>jon.seymour@gmail.com</email>
</author>
<published>2012-06-06T11:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=758615e2517db8b9fda9218afded06a3e1b42e20'/>
<id>urn:sha1:758615e2517db8b9fda9218afded06a3e1b42e20</id>
<content type='text'>
Currently git submodule init and git submodule sync fail with an error
if the superproject origin URL is of the form foo but succeed if the
superproject origin URL is of the form ./foo or ./foo/bar or foo/bar.

This change makes handling of the foo case behave like the handling
of the ./foo case and also ensures that superfluous leading and
embedded ./'s are removed from the resulting derived URLs.

Signed-off-by: Jon Seymour &lt;jon.seymour@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: document failure to handle relative superproject origin URLs</title>
<updated>2012-06-03T21:35:09Z</updated>
<author>
<name>Jon Seymour</name>
<email>jon.seymour@gmail.com</email>
</author>
<published>2012-06-03T09:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=49301c64f3612d68058efb428a74133ac6e4a071'/>
<id>urn:sha1:49301c64f3612d68058efb428a74133ac6e4a071</id>
<content type='text'>
This test case documents several cases where handling of relative
superproject origin URLs doesn't produce an expected result.

submodule.{sub}.url in the superproject is incorrect in these cases:
  foo
  ./foo
  ./foo/bar

The remote.origin.url of the submodule is incorrect in the above cases
and also when the superproject origin URL is like:
  foo/bar
  ../foo
  ../foo/bar

Signed-off-by: Jon Seymour &lt;jon.seymour@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: additional regression tests for relative URLs</title>
<updated>2012-06-03T21:34:47Z</updated>
<author>
<name>Jon Seymour</name>
<email>jon.seymour@gmail.com</email>
</author>
<published>2012-06-03T09:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=712693e8dbf188d4e9337c065617f09f7a0d1a16'/>
<id>urn:sha1:712693e8dbf188d4e9337c065617f09f7a0d1a16</id>
<content type='text'>
Some additional tests are added to support regression testing of the changes in the
remainder of the series.

We also add a pristine copy of .gitmodules in anticipation of this being
required by later tests.

Signed-off-by: Jon Seymour &lt;jon.seymour@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: modernise style: more uses of test_line_count</title>
<updated>2012-04-11T16:32:20Z</updated>
<author>
<name>Stefano Lattarini</name>
<email>stefano.lattarini@gmail.com</email>
</author>
<published>2012-04-11T11:24:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3fb0459bc89bebb07e0603ce3ce92dbbc8a39ea4'/>
<id>urn:sha1:3fb0459bc89bebb07e0603ce3ce92dbbc8a39ea4</id>
<content type='text'>
Prefer:

  test_line_count &lt;OP&gt; COUNT FILE

over:

  test $(wc -l &lt;FILE) &lt;OP&gt; COUNT

(or similar usages) in several tests.

Signed-off-by: Stefano Lattarini &lt;stefano.lattarini@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodules: always use a relative path from gitdir to work tree</title>
<updated>2012-03-05T05:20:27Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2012-03-04T21:15:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d75219b4a8a9c44520ddca234cde992498383b89'/>
<id>urn:sha1:d75219b4a8a9c44520ddca234cde992498383b89</id>
<content type='text'>
Since recently a submodule with name &lt;name&gt; has its git directory in the
.git/modules/&lt;name&gt; directory of the superproject while the work tree
contains a gitfile pointing there. To make that work the git directory has
the core.worktree configuration set in its config file to point back to
the work tree.

That core.worktree is an absolute path set by the initial clone of the
submodule. A relative path is preferable here because it allows the
superproject to be moved around without invalidating that setting, so
compute and set that relative path after cloning or reactivating the
submodule.

This also fixes a bug when moving a submodule around inside the
superproject, as the current code forgot to update the setting to the new
submodule work tree location.

Enhance t7400 to ensure that future versions won't re-add absolute paths
by accident and that moving a superproject won't break submodules.

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>
