-
Notifications
You must be signed in to change notification settings - Fork 140
[META] gitgitgadget/git is missing tags from git/git #319
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
Comments
Let's script this. Would you have time to come up with that script? It would compare the tags of two remotes, obtained via |
I can do that. I thought I would find the existing mirroring in gitgitgadget/gitgitgadget, but nothing there seemed to be doing it. Is that something I missed, or that you have in a repo somewhere, or do you just want me to put a bash script that mirrors (or just finds a list of) missing tags in this issue? This does more than tags, but maybe a stripped down version could do what you want. |
@dscho The script in dakotahawkins/sync-tags should do exactly what you want. It should leave alone any tags you have that aren't in upstream, but will rewrite tags you have that are in upstream but are out of date. |
It is a non-YAML build: https://dev.azure.com/gitgitgadget/git/_build?definitionId=8
I took the liberty of coming up with a simpler solution: die () {
echo "$*" >&2
exit 1
}
for d in git gitgitgadget
do
git ls-remote --tags https://github.com/$d/git | grep -v '\^{}$' | sort >tags.$d ||
die "Could not enumerate tags in $d"
done
refspec="$(comm -23 tags.git tags.gitgitgadget | tr '\t' :)" ||
die "Could figure out missing tags" ... and then pushing |
(Of course, I realize that this will not synchronize tags unless a branch triggers the build, as tag updates can only trigger YAML builds, but that's better than not synchronizing the tags at all.) |
I was going to say that if I were doing it (for this case especially) I would probably just destructively fetch branches and tags from the upstream at the same time and push those. Probably would be fine as long as you didn't prune anything that was only ever in the fork. A robust solution could probably identify and re-tag force-updated branches/tags for manual review or resurrection after the fact. Automatic fork syncing is the one thing I really wish GitHub offered. We have it at work with BitBucket server and it's fine, though you have to manually resolve pending force-updates. |
About tags: agree, branches, we already force-push. Pruning is a different matter: this would potentially fail (or close PRs), so I would like to avoid that. |
Yeah that's what I mean: You'd either want to prune nothing or maybe only prune things that you know originated in the upstream. A "safe" but sync-no-matter-what approach could re-tag about-to-be-overwritten refs before the update. Of course I think that's all unnecessary here, and I'm just glad to have the tags updating now :) |
The latest version tag is
v2.18.0
, @dscho can you update whatever process you use to sync this fork?Edit: Noticed this doing an initial
make configure
on my fork of this.The text was updated successfully, but these errors were encountered: