Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch tags when fetch-depth > 0. fix #1781 #2039

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andreineculau
Copy link

fixes #1781

if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) {
args.push('--no-tags')
if (options.fetchTags) {
args.push('--tags')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work.
the bug in git cause the --tags get ignored when we pass any refspec.

19:38:51.501221 git.c:476               trace: built-in: git fetch --prune --no-recurse-submodules --depth=1 --tags origin +dafa907d050b7aca612cb1fc3262cbe1157a41d4:refs/remotes/origin/main
From https://github.com/TingluoHuang/repo-3208316
 + 2e53bff...dafa907 dafa907d050b7aca612cb1fc3262cbe1157a41d4 -> origin/main  (forced update)

vs older git version

19:45:56.613886 git.c:479               trace: built-in: git fetch --prune --no-recurse-submodules --depth=1 --tags origin +dafa907d050b7aca612cb1fc3262cbe1157a41d4:refs/remotes/origin/main
From https://github.com/TingluoHuang/repo-3208316
 + 5b6b8cc...dafa907 dafa907d0[50](https://github.com/TingluoHuang/repo-3208316/actions/runs/13315815917/job/37189415774#step:4:51)b7aca612cb1fc3262cbe1157a41d4 -> origin/main  (forced update)
 * [new tag]         v13315501148                             -> v13315501148
 * [new tag]         v13315557600                             -> v13315557600
 * [new tag]         v13315584914                             -> v13315584914
 * [new tag]         v13315601791                             -> v13315601791
 * [new tag]         v133156378[52](https://github.com/TingluoHuang/repo-3208316/actions/runs/13315815917/job/37189415774#step:4:53)                             -> v13315637852
 * [new tag]         v13315718561                             -> v13315718561
 * [new tag]         v13315732428                             -> v13315732428
 * [new tag]         v13315782509                             -> v13315782509

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fetch-tags is not working according to the docs with v4
3 participants