<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t7400-submodule-basic.sh, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2021-11-19T17:19:54Z</updated>
<entry>
<title>submodule: absorb git dir instead of dying on deinit</title>
<updated>2021-11-19T17:19:54Z</updated>
<author>
<name>Mugdha Pattnaik</name>
<email>mugdhapattnaik@gmail.com</email>
</author>
<published>2021-11-19T10:56:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0adc8ba6ae2b76501f4e0e57cc83d79be5305418'/>
<id>urn:sha1:0adc8ba6ae2b76501f4e0e57cc83d79be5305418</id>
<content type='text'>
Currently, running 'git submodule deinit' on repos where the
submodule's '.git' is a directory, aborts with a message that is not
exactly user friendly.

Let's change this to instead warn the user that the .git/ directory
has been absorbed into the superproject.
The rest of the deinit function can operate as it already does with
new-style submodules.

In one test, we used to require "git submodule deinit" to fail even
with the "--force" option when the submodule's .git/ directory is not
absorbed. Adjust it to expect the operation to pass.

Suggested-by: Atharva Raykar &lt;raykar.ath@gmail.com&gt;
Signed-off-by: Mugdha Pattnaik &lt;mugdhapattnaik@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: prefix die messages with 'fatal'</title>
<updated>2021-07-12T19:06:21Z</updated>
<author>
<name>Atharva Raykar</name>
<email>raykar.ath@gmail.com</email>
</author>
<published>2021-07-10T07:47:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0008d12284ef916b53341c2aadccdc017ff07c7a'/>
<id>urn:sha1:0008d12284ef916b53341c2aadccdc017ff07c7a</id>
<content type='text'>
The standard `die()` function that is used in C code prefixes all the
messages passed to it with 'fatal: '. This does not happen with the
`die` used in 'git-submodule.sh'.

Let's prefix each of the shell die messages with 'fatal: ' so that when
they are converted to C code, the error messages stay the same as before
the conversion.

Note that the shell version of `die` exits with error code 1, while the
C version exits with error code 128. In practice, this does not change
any behaviour, as no functionality in 'submodule add' and 'submodule
update' relies on the value of the exit code.

Signed-off-by: Atharva Raykar &lt;raykar.ath@gmail.com&gt;
Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Shourya Shukla &lt;periperidip@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t7400: test failure to add submodule in tracked path</title>
<updated>2021-07-07T18:00:01Z</updated>
<author>
<name>Atharva Raykar</name>
<email>raykar.ath@gmail.com</email>
</author>
<published>2021-07-06T18:19:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=84069fcc140480fb76dc204ebce7819c2c87ec7c'/>
<id>urn:sha1:84069fcc140480fb76dc204ebce7819c2c87ec7c</id>
<content type='text'>
Add a test to ensure failure on adding a submodule to a directory with
tracked contents in the index.

As we are going to refactor and port to C some parts of `git submodule
add`, let's add a test to help ensure no regression is introduced.

Signed-off-by: Atharva Raykar &lt;raykar.ath@gmail.com&gt;
Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Based-on-patch-by: Shourya Shukla &lt;periperidip@gmail.com&gt;
Mentored-by: Shourya Shukla &lt;periperidip@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: remove most uses of test_i18ncmp</title>
<updated>2021-02-11T07:48:27Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-02-11T01:53:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=1108cea7f8ee38a8507c1cc68d1fafe2eb31d623'/>
<id>urn:sha1:1108cea7f8ee38a8507c1cc68d1fafe2eb31d623</id>
<content type='text'>
As a follow-up to d162b25f956 (tests: remove support for
GIT_TEST_GETTEXT_POISON, 2021-01-20) remove most uses of test_i18ncmp
via a simple s/test_i18ncmp/test_cmp/g search-replacement.

I'm leaving t6300-for-each-ref.sh out due to a conflict with in-flight
changes between "master" and "seen", as well as the prerequisite
itself due to other changes between "master" and "next/seen" which add
new test_i18ncmp uses.

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>t7[0-4]*: adjust the references to the default branch name "main"</title>
<updated>2020-11-19T23:44:18Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-11-18T23:44:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=01dc81336dc10c8f2350454c755a8a0ab676a9c9'/>
<id>urn:sha1:01dc81336dc10c8f2350454c755a8a0ab676a9c9</id>
<content type='text'>
Carefully excluding t7064, which sees independent development elsewhere
at the time of writing, we use `main` as the default branch name in
t7[0-4]*. This trick was performed via

	$ (cd t &amp;&amp;
	   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
		-e 's/Master/Main/g' -- t7[0-4]*.sh &amp;&amp;
	   git checkout HEAD -- t7064\*)

This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`
for those tests.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: mark tests relying on the current default for `init.defaultBranch`</title>
<updated>2020-11-19T23:44:17Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-11-18T23:44:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=334afbc76fbd4a8d850946a2b450ba036365b554'/>
<id>urn:sha1:334afbc76fbd4a8d850946a2b450ba036365b554</id>
<content type='text'>
In addition to the manual adjustment to let the `linux-gcc` CI job run
the test suite with `master` and then with `main`, this patch makes sure
that GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is set in all test scripts
that currently rely on the initial branch name being `master by default.

To determine which test scripts to mark up, the first step was to
force-set the default branch name to `master` in

- all test scripts that contain the keyword `master`,

- t4211, which expects `t/t4211/history.export` with a hard-coded ref to
  initialize the default branch,

- t5560 because it sources `t/t556x_common` which uses `master`,

- t8002 and t8012 because both source `t/annotate-tests.sh` which also
  uses `master`)

This trick was performed by this command:

	$ sed -i '/^ *\. \.\/\(test-lib\|lib-\(bash\|cvs\|git-svn\)\|gitweb-lib\)\.sh$/i\
	GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\
	export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\
	' $(git grep -l master t/t[0-9]*.sh) \
	t/t4211*.sh t/t5560*.sh t/t8002*.sh t/t8012*.sh

After that, careful, manual inspection revealed that some of the test
scripts containing the needle `master` do not actually rely on a
specific default branch name: either they mention `master` only in a
comment, or they initialize that branch specificially, or they do not
actually refer to the current default branch. Therefore, the
aforementioned modification was undone in those test scripts thusly:

	$ git checkout HEAD -- \
		t/t0027-auto-crlf.sh t/t0060-path-utils.sh \
		t/t1011-read-tree-sparse-checkout.sh \
		t/t1305-config-include.sh t/t1309-early-config.sh \
		t/t1402-check-ref-format.sh t/t1450-fsck.sh \
		t/t2024-checkout-dwim.sh \
		t/t2106-update-index-assume-unchanged.sh \
		t/t3040-subprojects-basic.sh t/t3301-notes.sh \
		t/t3308-notes-merge.sh t/t3423-rebase-reword.sh \
		t/t3436-rebase-more-options.sh \
		t/t4015-diff-whitespace.sh t/t4257-am-interactive.sh \
		t/t5323-pack-redundant.sh t/t5401-update-hooks.sh \
		t/t5511-refspec.sh t/t5526-fetch-submodules.sh \
		t/t5529-push-errors.sh t/t5530-upload-pack-error.sh \
		t/t5548-push-porcelain.sh \
		t/t5552-skipping-fetch-negotiator.sh \
		t/t5572-pull-submodule.sh t/t5608-clone-2gb.sh \
		t/t5614-clone-submodules-shallow.sh \
		t/t7508-status.sh t/t7606-merge-custom.sh \
		t/t9302-fast-import-unpack-limit.sh

We excluded one set of test scripts in these commands, though: the range
of `git p4` tests. The reason? `git p4` stores the (foreign) remote
branch in the branch called `p4/master`, which is obviously not the
default branch. Manual analysis revealed that only five of these tests
actually require a specific default branch name to pass; They were
modified thusly:

	$ sed -i '/^ *\. \.\/lib-git-p4\.sh$/i\
	GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\
	export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\
	' t/t980[0167]*.sh t/t9811*.sh

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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='http://git.kilabit.info/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='http://git.kilabit.info/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='http://git.kilabit.info/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='http://git.kilabit.info/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>
</feed>
