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

jj git fetch does not delete tags that were deleted on remote #5663

Open
necauqua opened this issue Feb 12, 2025 · 5 comments
Open

jj git fetch does not delete tags that were deleted on remote #5663

necauqua opened this issue Feb 12, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@necauqua
Copy link
Contributor

Description

A bit of an idiosyncratic setup, but on my work the monorepo has tags for every commit in the last 30 days. This even does make some sense actually - it's for people knowing which revision is newer, the tags are just sequential revision numbers used in CI/CD.
Tags older than 30d are deleted.

After a few months like that, gitlab just started completely hanging at the end of my push.
git push had identical behaviour, and with it I observed this

λ bat ../git-trace.txt | rg 'push>.*?refs/tags' -c
3565
λ bat ../git-trace.txt | rg 'push<.*?refs/tags' -c
1381

Freshly re-cloned monorepo did not have any push> lines, and the push worked fine.

So both jj and git try to push the local tags, or at least negotiate something about them, I'm not too sure what do those lines mean, and gitlab didn't like that.
Doing git tag -d $(git tag -l) to delete all local tags (and then jj git fetch to refetch currently-existing remote tags) fixed the issue completely.

@PhilipMetzger
Copy link
Contributor

cc @bsdinis since you've changed the behavior there.

@PhilipMetzger PhilipMetzger added the 🐛bug Something isn't working label Feb 12, 2025
@bsdinis
Copy link
Contributor

bsdinis commented Feb 12, 2025

@necauqua does this just happen with git2 or with subprocessing?

@necauqua
Copy link
Contributor Author

Nope, I never used the new subprocessing thing.
Default fetch/push worked well enough on this monorepo

Just realised that yeah, I can enable git.subrocess so that git does the fetching, that will probably fix this

@bsdinis
Copy link
Contributor

bsdinis commented Feb 12, 2025

Let me know if it does.
In any case, I don't think this is a bug, but a feature request to prune tags

@martinvonz martinvonz added enhancement New feature or request and removed 🐛bug Something isn't working labels Feb 12, 2025
@bsdinis
Copy link
Contributor

bsdinis commented Feb 12, 2025

Just realised that yeah, I can enable git.subrocess so that git does the fetching, that will probably fix this

If you rebuild main it should have it by default :-)

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

No branches or pull requests

4 participants