summaryrefslogtreecommitdiff
path: root/t/t0410-partial-clone.sh
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2020-09-02 21:05:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-02 21:26:55 (GMT)
commitdb3c293ecded67128b74a03f01e65c6799ff1116 (patch)
tree6f6c6767953c0699421711dfe40867a54ce7971c /t/t0410-partial-clone.sh
parent9dfa8dbeee18a126aabcdd36a06e5d6b5eb6a58a (diff)
downloadgit-db3c293ecded67128b74a03f01e65c6799ff1116.zip
git-db3c293ecded67128b74a03f01e65c6799ff1116.tar.gz
git-db3c293ecded67128b74a03f01e65c6799ff1116.tar.bz2
fetch: no FETCH_HEAD display if --no-write-fetch-head
887952b8c6 ("fetch: optionally allow disabling FETCH_HEAD update", 2020-08-18) introduced the ability to disable writing to FETCH_HEAD during fetch, but did not suppress the "<source> -> FETCH_HEAD" message when this ability is used. This message is misleading in this case, because FETCH_HEAD is not written. Also, because "fetch" is used to lazy-fetch missing objects in a partial clone, this significantly clutters up the output in that case since the objects to be fetched are potentially numerous. Therefore, suppress this message when --no-write-fetch-head is passed (but not when --dry-run is set). Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0410-partial-clone.sh')
-rwxr-xr-xt/t0410-partial-clone.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
index d681e90..584a039 100755
--- a/t/t0410-partial-clone.sh
+++ b/t/t0410-partial-clone.sh
@@ -183,7 +183,7 @@ test_expect_success 'missing CLI object, but promised, passes fsck' '
'
test_expect_success 'fetching of missing objects' '
- rm -rf repo &&
+ rm -rf repo err &&
test_create_repo server &&
test_commit -C server foo &&
git -C server repack -a -d --write-bitmap-index &&
@@ -194,7 +194,10 @@ test_expect_success 'fetching of missing objects' '
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "origin" &&
- git -C repo cat-file -p "$HASH" &&
+ git -C repo cat-file -p "$HASH" 2>err &&
+
+ # Ensure that no spurious FETCH_HEAD messages are written
+ ! grep FETCH_HEAD err &&
# Ensure that the .promisor file is written, and check that its
# associated packfile contains the object