<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t7400-submodule-basic.sh, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-07-19T18:10:43Z</updated>
<entry>
<title>git submodule add: Require the new --force option to add ignored paths</title>
<updated>2010-07-19T18:10:43Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2010-07-17T15:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d27b876b284b8fb82db971bc7cea8c9782614ab2'/>
<id>urn:sha1:d27b876b284b8fb82db971bc7cea8c9782614ab2</id>
<content type='text'>
To make the behavior of "git submodule add" more consistent with "git add"
ignored submodule paths should not be silently added when they match an
entry in a .gitignore file. To be able to override that default behavior
in the same way as we can do that for "git add", the new option "--force"
is introduced.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Acked-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git submodule: add submodules with git add -f &lt;path&gt;</title>
<updated>2010-07-05T18:53:59Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2010-07-05T17:33:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31991b0260216d16f2e447e68bcabd9d9cce26ba'/>
<id>urn:sha1:31991b0260216d16f2e447e68bcabd9d9cce26ba</id>
<content type='text'>
Change `git submodule add' to add the new submodule &lt;path&gt; with `git
add --force'.

I keep my /etc in .git with a .gitignore that contains just
"*". I.e. `git status' will ignore everything that isn't in the tree
already. When I do:

    git submodule add &lt;url&gt; hlagh

git-submodule will get as far as checking out the remote repository
into hlagh, but it'll die right afterwards when it fails to add the
new path:

    The following paths are ignored by one of your .gitignore files:
    hlagh
    Use -f if you really want to add them.
    fatal: no files added
    Failed to add submodule 'hlagh'

Currently there's no way to add a submodule in this situation other
than to remove the ignored path from the .gitignore while I'm at it.

That's silly, when you run `git submodule add' you're explicitly
saying that you want to add something *new* to the repository. Instead
it should just add the path with `git add --force'.

Initially I implemented this by adding new -f and --force options to
`git submodule add'. But if the --force option isn't supplied it'll
get as far as cloning `hlagh', but won't add it.

So the first thing the user has to do is to remove `hlagh' and then
try again with the --force option.

That sucks, it should just add the path to begin with. I can't think
of any usecase where you've gone through the trouble of typing out
`git submodule add ..', but wish to be overriden by a `gitignore'. The
submodule semantics should be more like `git init', not `git add'.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t7400: clarify submodule update tests</title>
<updated>2010-04-11T04:36:07Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2010-04-10T05:39:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce8b54d67678249128b33733ad154dbcd90e6660'/>
<id>urn:sha1:ce8b54d67678249128b33733ad154dbcd90e6660</id>
<content type='text'>
In particular, add a missing &amp;&amp; to the update --init test.

The goal is to make it clearer what happened when one of these
tests fails.  The update --init test is currently (consistently)
failing on a few unusual machines.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t7400: clarify 'submodule add' tests</title>
<updated>2010-04-11T04:30:59Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2010-04-10T05:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a76c944bbe207953c9f0f23311702d2b8225d486'/>
<id>urn:sha1:a76c944bbe207953c9f0f23311702d2b8225d486</id>
<content type='text'>
A new reader may not realize what properties the $submodurl
repository needs to have.

One of the tests is checking that ‘submodule add -b foo’ creates
a ‘foo’ branch.  Put this test in context by checking that
without -b, no ‘foo’ branch is created.

While at it, make sure each added submodule is a reasonable
repository, with clean index, no stray files, and so on.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t7400: split setup into multiple tests</title>
<updated>2010-04-11T04:24:43Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2010-04-10T05:38:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe454b13156e639adaae4526d04fd5b74eb8c84c'/>
<id>urn:sha1:fe454b13156e639adaae4526d04fd5b74eb8c84c</id>
<content type='text'>
The setup in t7400-submodule-basic does a number of different
things to support different tests.  Splitting it up makes the
test a little easier to read and should provide an opportunity
to move each piece of setup closer to the tests that require it.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Remove empty directories when checking out a commit with fewer submodules</title>
<updated>2010-01-12T03:50:51Z</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2010-01-11T02:59:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5e558a80ad27774b9984258a31fbf46a1d7c152'/>
<id>urn:sha1:c5e558a80ad27774b9984258a31fbf46a1d7c152</id>
<content type='text'>
Change the unlink_entry function to use rmdir to remove submodule
directories.  Currently we try to use unlink, which will never succeed.

Of course rmdir will only succeed for empty (i.e. not checked out)
submodule directories.  Behaviour if a submodule is checked out stays
essentially the same: print a warning message and keep the submodule
directory.

Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git submodule add: make the &lt;path&gt; parameter optional</title>
<updated>2009-09-22T19:24:49Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2009-09-22T15:10:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1414e5788b85787a712a30977b388200f1bc04da'/>
<id>urn:sha1:1414e5788b85787a712a30977b388200f1bc04da</id>
<content type='text'>
When &lt;path&gt; is not given, use the "humanish" part of the source repository
instead.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Work around ash "alternate value" expansion bug</title>
<updated>2009-04-19T04:37:46Z</updated>
<author>
<name>Ben Jackson</name>
<email>ben@ben.com</email>
</author>
<published>2009-04-19T03:42:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea10b60c910e4a23483f47f17becc5e58f07ebe9'/>
<id>urn:sha1:ea10b60c910e4a23483f47f17becc5e58f07ebe9</id>
<content type='text'>
Ash (used as /bin/sh on many distros) has a shell expansion bug
for the form ${var:+word word}.  The result is a single argument
"word word".  Work around by using ${var:+word} ${var:+word} or
equivalent.

Signed-off-by: Ben Jackson &lt;ben@ben.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mg/maint-submodule-normalize-path'</title>
<updated>2009-03-11T20:50:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-03-11T20:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=500ff119682eaa6d5047b40e54688219a57716ca'/>
<id>urn:sha1:500ff119682eaa6d5047b40e54688219a57716ca</id>
<content type='text'>
* mg/maint-submodule-normalize-path:
  git submodule: Fix adding of submodules at paths with ./, .. and //
  git submodule: Add test cases for git submodule add
</content>
</entry>
<entry>
<title>git submodule: Fix adding of submodules at paths with ./, .. and //</title>
<updated>2009-03-04T05:46:09Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2009-03-03T15:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db75ada559dd4de99fedd1fc4f62a9273f032dd3'/>
<id>urn:sha1:db75ada559dd4de99fedd1fc4f62a9273f032dd3</id>
<content type='text'>
Make 'git submodule add' normalize the submodule path in the
same way as 'git ls-files' does, so that 'git submodule init' looks up
the information in .gitmodules with the same key under which 'git
submodule add' stores it.

This fixes 4 known breakages.

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
