3 ms·
By default, most things assume that tags are immutable and won't check for updates to a tag. So tags aren't great for things that can expire or otherwise need
by LukeShu 3y ago
By default, most things assume that tags are immutable and won't check for updates to a tag. So tags aren't great for things that can expire or otherwise need to be changed.
- loeg 3y agoHuh, is that true? If you push a new version of a tag, Github will ignore it? Or if you 'git fetch', git does not update tags? I would be pretty surprised at either of those.
- WorldMaker 3y agoAll tag updates require a force push and any existing clones also need a force pull.
- loeg 3y agoI agree. It is not the case that "most things ... won't check for updates to a tag," which is what GP claimed and I responded to. Most things do check for updates! Without checking, they could not warn you about / reject updates.
- WorldMaker 3y agoThe trick to remember though is that new clones don't have any "update" check, they only see and fetch the latest value. There's no force push audit log for git refs in most git server software, there's just "local and remote refs disagree". That's not really an "update check" from the perspective of "having an update notification or update event".
- remram 3y agoIt's the second one
- loeg 3y agoI don't think so. In both cases, there was visible UI of either the new tag or that the tag was changed. Github shows the updated tag. git pull --tags shows: ! [rejected] <tag> -> <tag> (would clobber existing tag) git pull --tags --force updates the tag.
- remram 3y agoYou asked about `git fetch`. If you change your question to `git pull --tags` then yes, the answer is different.
- loeg 3y agogit fetch --tags presents the exact same warning/error.
- remram 3y agoThat's right. > if you 'git fetch', git does not update tags? I would be pretty surprised This is the comment you replied to: > By default, most things assume that tags are immutable and won't check for updates to a tag. You can use options to change from the default. I don't know what point you are now trying to make, but this conversation is getting very laborious.