From: Junio C Hamano <gitster@pobox.com>
To: Calvin Wan <calvinwan@google.com>
Cc: git@vger.kernel.org, Josh Steadmon <steadmon@google.com>, peff@peff.net
Subject: Re: [PATCH v2 2/6] tests: Use `git submodule add` instead of `git add`
Date: Tue, 28 Feb 2023 15:30:29 -0800 [thread overview]
Message-ID: <xmqqttz5pduy.fsf@gitster.g> (raw)
In-Reply-To: <20230228185642.2357806-2-calvinwan@google.com> (Calvin Wan's message of "Tue, 28 Feb 2023 18:56:38 +0000")
Calvin Wan <calvinwan@google.com> writes:
> diff --git a/t/t2013-checkout-submodule.sh b/t/t2013-checkout-submodule.sh
> index b2bdd1fcb4..dd2858648b 100755
> --- a/t/t2013-checkout-submodule.sh
> +++ b/t/t2013-checkout-submodule.sh
> @@ -10,7 +10,7 @@ test_expect_success 'setup' '
> (cd submodule &&
> git init &&
> test_commit first) &&
> - git add submodule &&
> + git submodule add ./submodule &&
The change from "submodule" to "./submodule" was not explained in
the proposed log message. I think this is necessary for "git
submodule add" to function as expected, but if that is why we are
making this change, perhaps we should mention it?
> @@ -51,6 +51,7 @@ test_expect_success '"checkout <submodule>" honors submodule.*.ignore from .gitm
> git config diff.ignoreSubmodules none &&
> git config -f .gitmodules submodule.submodule.path submodule &&
> git config -f .gitmodules submodule.submodule.ignore untracked &&
> + git commit -m "Update patterns in .gitmodules" .gitmodules &&
What does "patterns" refer here (another one in the next hunk)?
> diff --git a/t/t2103-update-index-ignore-missing.sh b/t/t2103-update-index-ignore-missing.sh
> index e9451cd567..11bc136f6e 100755
> --- a/t/t2103-update-index-ignore-missing.sh
> +++ b/t/t2103-update-index-ignore-missing.sh
> @@ -36,7 +36,7 @@ test_expect_success basics '
> git add file &&
> git commit -m "sub initial"
> ) &&
> - git add xyzzy &&
> + git add ./xyzzy &&
Is this supposed to have become "git submodule add ./xyzzy"? Or
"git add xyzzy" will trigger "don't add gitlink" warning but you can
write "git add ./xyzzy" as a way to work around the warning?
Or is this an incomplete change that wasn't spotted during
proofreading?
> diff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh
> index 302e4cbdba..f8ef70b5a2 100755
> --- a/t/t5531-deep-submodule-push.sh
> +++ b/t/t5531-deep-submodule-push.sh
> @@ -28,7 +28,7 @@ test_expect_success setup '
> git add junk &&
> git commit -m "Initial junk"
> ) &&
> - git add gar/bage &&
> + git submodule add ./gar/bage ./gar/bage &&
Why does this one (and only this one) look different? Everybody
else changed "git add A" to "git submodule add ./A", it seems?
> diff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh
> ...
I think I saw a code section that was touched in the previous patch
that hand-crafted .gitmodules file to make the gitlink it adds into
a submodule. It is unexpected and puzzling that there is no removal
of that "cat >.gitmodules" from t4060.
next prev parent reply other threads:[~2023-02-28 23:30 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 18:21 [RFC PATCH 0/6] add: block invalid submodules Calvin Wan
2023-02-13 18:21 ` [RFC PATCH 1/6] leak fix: cache_put_path Calvin Wan
2023-02-13 19:23 ` Junio C Hamano
2023-02-14 19:56 ` Calvin Wan
2023-02-14 21:08 ` Junio C Hamano
2023-02-14 21:39 ` Calvin Wan
2023-02-14 21:59 ` Junio C Hamano
2023-02-13 18:21 ` [RFC PATCH 2/6] t4041, t4060: modernize test style Calvin Wan
2023-02-13 19:41 ` Junio C Hamano
2023-02-14 20:22 ` Calvin Wan
2023-02-13 18:21 ` [RFC PATCH 3/6] tests: Use `git submodule add` instead of `git add` Calvin Wan
2023-02-13 18:21 ` [RFC PATCH 4/6] tests: use `git submodule add` and fix expected diffs Calvin Wan
2023-02-13 23:07 ` Junio C Hamano
2023-02-13 23:19 ` Junio C Hamano
2023-02-13 18:21 ` [RFC PATCH 5/6] tests: use `git submodule add` and fix expected status Calvin Wan
2023-02-13 18:21 ` [RFC PATCH 6/6] add: reject nested repositories Calvin Wan
2023-02-13 20:42 ` Jeff King
2023-02-14 2:17 ` Junio C Hamano
2023-02-14 16:07 ` Jeff King
2023-02-14 16:32 ` Junio C Hamano
2023-02-14 21:45 ` Calvin Wan
2023-02-28 18:52 ` [PATCH v2 0/6] add: block invalid submodules Calvin Wan
2023-02-28 18:56 ` [PATCH v2 1/6] t4041, t4060: modernize test style Calvin Wan
2023-03-06 19:32 ` Glen Choo
2023-03-06 20:40 ` Calvin Wan
2023-02-28 18:56 ` [PATCH v2 2/6] tests: Use `git submodule add` instead of `git add` Calvin Wan
2023-02-28 23:30 ` Junio C Hamano [this message]
2023-03-03 0:16 ` Calvin Wan
2023-03-06 21:26 ` Glen Choo
2023-02-28 18:56 ` [PATCH v2 3/6] tests: use `git submodule add` and fix expected diffs Calvin Wan
2023-03-06 23:34 ` Glen Choo
2023-03-06 23:57 ` Junio C Hamano
2023-02-28 18:56 ` [PATCH v2 4/6] tests: use `git submodule add` and fix expected status Calvin Wan
2023-03-07 0:15 ` Glen Choo
2023-02-28 18:56 ` [PATCH v2 5/6] tests: remove duplicate .gitmodules path Calvin Wan
2023-02-28 23:35 ` Junio C Hamano
2023-03-02 23:09 ` Calvin Wan
2023-03-07 0:51 ` Glen Choo
2023-02-28 18:56 ` [PATCH v2 6/6] add: reject nested repositories Calvin Wan
2023-03-07 2:04 ` Glen Choo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqttz5pduy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=calvinwan@google.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=steadmon@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.