From: Christian Couder <christian.couder@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Patrick Steinhardt <ps@pks.im>, John Cai <johncai86@gmail.com>,
Linus Arver <linusa@google.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v3 1/5] t9210: do not rely on lazy fetching to fail
Date: Wed, 14 Feb 2024 15:25:09 +0100 [thread overview]
Message-ID: <20240214142513.4002639-2-christian.couder@gmail.com> (raw)
In-Reply-To: <20240214142513.4002639-1-christian.couder@gmail.com>
From: Junio C Hamano <gitster@pobox.com>
With "rev-list --missing=print $start", where "$start" is a 40-hex
object name, the object may or may not be lazily fetched from the
promisor. Make sure it fails by forcing dereference of "$start"
at that point.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t9210-scalar.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh
index 4432a30d10..428339e342 100755
--- a/t/t9210-scalar.sh
+++ b/t/t9210-scalar.sh
@@ -154,7 +154,14 @@ test_expect_success 'scalar clone' '
test_cmp expect actual &&
test_path_is_missing 1/2 &&
- test_must_fail git rev-list --missing=print $second &&
+
+ # This relies on the fact that the presence of "--missing"
+ # on the command line forces lazy fetching off before
+ # "$second^{blob}" gets parsed. Without "^{blob}", a
+ # bare object name "$second" is taken into the queue and
+ # the command may not fail with a fixed "rev-list --missing".
+ test_must_fail git rev-list --missing=print "$second^{blob}" -- &&
+
git rev-list $second &&
git cat-file blob $second >actual &&
echo "second" >expect &&
--
2.44.0.rc0.51.gda36843b44
next prev parent reply other threads:[~2024-02-14 14:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 13:50 [PATCH v2 0/4] rev-list: allow missing tips with --missing Christian Couder
2024-02-08 13:50 ` [PATCH v2 1/4] revision: clarify a 'return NULL' in get_reference() Christian Couder
2024-02-08 13:50 ` [PATCH v2 2/4] oidset: refactor oidset_insert_from_set() Christian Couder
2024-02-08 17:33 ` Junio C Hamano
2024-02-13 21:02 ` Linus Arver
2024-02-14 14:33 ` Christian Couder
2024-02-16 1:10 ` Linus Arver
2024-02-16 10:38 ` Christian Couder
2024-02-16 20:27 ` Linus Arver
2024-02-08 13:50 ` [PATCH v2 3/4] t6022: fix 'test' style and 'even though' typo Christian Couder
2024-02-08 13:50 ` [PATCH v2 4/4] rev-list: allow missing tips with --missing=[print|allow*] Christian Couder
2024-02-08 17:44 ` Junio C Hamano
2024-02-13 22:38 ` Linus Arver
2024-02-14 14:34 ` Christian Couder
2024-02-14 16:49 ` Junio C Hamano
2024-02-14 14:39 ` Christian Couder
2024-02-13 22:33 ` Linus Arver
2024-02-14 14:38 ` Christian Couder
2024-02-16 1:24 ` Linus Arver
2024-02-08 23:15 ` [PATCH v2 0/4] rev-list: allow missing tips with --missing Junio C Hamano
2024-02-14 14:26 ` Christian Couder
2024-02-14 14:25 ` [PATCH v3 0/5] " Christian Couder
2024-02-14 14:25 ` Christian Couder [this message]
2024-02-14 14:25 ` [PATCH v3 2/5] revision: clarify a 'return NULL' in get_reference() Christian Couder
2024-02-14 14:25 ` [PATCH v3 3/5] oidset: refactor oidset_insert_from_set() Christian Couder
2024-02-14 14:25 ` [PATCH v3 4/5] t6022: fix 'test' style and 'even though' typo Christian Couder
2024-02-14 14:25 ` [PATCH v3 5/5] rev-list: allow missing tips with --missing=[print|allow*] Christian Couder
2024-02-16 21:56 ` [PATCH v3 0/5] rev-list: allow missing tips with --missing Linus Arver
2024-02-28 9:10 ` [PATCH] revision: fix --missing=[print|allow*] for annotated tags Christian Couder
2024-02-28 17:46 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240214142513.4002639-2-christian.couder@gmail.com \
--to=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johncai86@gmail.com \
--cc=linusa@google.com \
--cc=ps@pks.im \
--cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).