From: "Orgad Shaneh via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Orgad Shaneh <orgads@gmail.com>,
Orgad Shaneh <orgad.shaneh@audiocodes.com>
Subject: [PATCH 1/2] fetch: add a test for --force flag
Date: Sun, 15 Feb 2026 20:23:35 +0000 [thread overview]
Message-ID: <3ef70fe673170925ccf2901a625fb458837e9fcf.1771187016.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2200.git.git.1771187016.gitgitgadget@gmail.com>
From: Orgad Shaneh <orgad.shaneh@audiocodes.com>
There are two ways to force-fetch tags that have changed: either by
specifying an explicit forced ref (+refs/tags/*:refs/tags/*), or by
using --force.
The first approach was already tested, but the second was not. This
has now been addressed.
Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
---
t/t5516-fetch-push.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 29e2f17608..31df7faf56 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -1105,7 +1105,10 @@ test_force_fetch_tag () {
git commit -m 'file1' &&
git tag $tag_args testTag &&
test_must_fail git -C ../child1 fetch origin tag testTag &&
- git -C ../child1 fetch origin '+refs/tags/*:refs/tags/*'
+ git -C ../child1 fetch origin '+refs/tags/*:refs/tags/*' &&
+ git tag $tag_args testTag HEAD^ &&
+ test_must_fail git -C ../child1 fetch origin tag testTag &&
+ git -C ../child1 fetch --force origin tag testTag
)
"
}
--
gitgitgadget
next prev parent reply other threads:[~2026-02-15 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-15 20:23 [PATCH 0/2] fetch: clobber existing tags with --prune-tags Orgad Shaneh via GitGitGadget
2026-02-15 20:23 ` Orgad Shaneh via GitGitGadget [this message]
2026-02-15 20:23 ` [PATCH 2/2] " Orgad Shaneh via GitGitGadget
2026-03-18 8:27 ` Orgad Shaneh
2026-03-21 18:26 ` Junio C Hamano
2026-03-26 7:57 ` Orgad Shaneh
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=3ef70fe673170925ccf2901a625fb458837e9fcf.1771187016.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=orgad.shaneh@audiocodes.com \
--cc=orgads@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox