From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] fetch: pass --no-write-fetch-head to subprocesses
Date: Wed, 08 Mar 2023 15:40:20 -0800 [thread overview]
Message-ID: <xmqqjzzqrevv.fsf@gitster.g> (raw)
In-Reply-To: <xmqqttyurg4w.fsf@gitster.g> (Junio C. Hamano's message of "Wed, 08 Mar 2023 15:13:19 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> I think we should instead enumerate submodule repositories, instead
> of enumerating existing .git/FETCH_HEAD files.
Perhaps something along this line?
t/t5526-fetch-submodules.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git c/t/t5526-fetch-submodules.sh w/t/t5526-fetch-submodules.sh
index 8ffb300f2d..dcdbe26a08 100755
--- c/t/t5526-fetch-submodules.sh
+++ w/t/t5526-fetch-submodules.sh
@@ -170,13 +170,13 @@ test_expect_success "fetch --recurse-submodules recurses into submodules" '
test_expect_success "fetch --recurse-submodules honors --no-write-fetch-head" '
(
cd downstream &&
- fh=$(find . -name FETCH_HEAD -type f) &&
- rm -f $fh &&
+ git submodule foreach --recursive \
+ sh -c "cd \"\$(git rev-parse --git-dir)\" && rm -f FETCH_HEAD" &&
+
git fetch --recurse-submodules --no-write-fetch-head &&
- for f in $fh
- do
- test_path_is_missing $f || return 1
- done
+
+ git submodule foreach --recursive \
+ sh -c "cd \"\$(git rev-parse --git-dir)\" && ! test -f FETCH_HEAD"
)
'
next prev parent reply other threads:[~2023-03-08 23:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 10:04 [PATCH] fetch: pass --no-write-fetch-head to subprocesses Eric Wong
2023-03-08 17:41 ` Junio C Hamano
2023-03-08 22:22 ` [PATCH v2] " Eric Wong
2023-03-08 23:13 ` Junio C Hamano
2023-03-08 23:40 ` Junio C Hamano [this message]
2023-03-08 23:48 ` Eric Wong
2023-03-09 21:32 ` Junio C Hamano
2023-03-09 3:09 ` [PATCH] " Jeff King
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=xmqqjzzqrevv.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
/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.