News for hackers. Stuff that matters.
Re:Git Files Hidden in Plain Sight by LukeShu on Tuesday August 01, 2023 @01:53AM (#36952797)
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.
Re:Git Files Hidden in Plain Sight by loeg on Tuesday August 01, 2023 @10:31AM (#36956407)
Huh, 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.
Re:Git Files Hidden in Plain Sight by WorldMaker on Tuesday August 01, 2023 @11:15AM (#36957055)
All tag updates require a force push and any existing clones also need a force pull.
Re:Git Files Hidden in Plain Sight by loeg on Tuesday August 01, 2023 @12:57PM (#36958746)
I 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.
Re:Git Files Hidden in Plain Sight by WorldMaker on Tuesday August 01, 2023 @01:27PM (#36959256)
The 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".
Re:Git Files Hidden in Plain Sight by remram on Tuesday August 01, 2023 @11:19AM (#36957119)
It's the second one
Re:Git Files Hidden in Plain Sight by loeg on Tuesday August 01, 2023 @12:55PM (#36958712)
I 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.
Re:Git Files Hidden in Plain Sight by remram on Tuesday August 01, 2023 @01:13PM (#36959013)
You asked about `git fetch`. If you change your question to `git pull --tags` then yes, the answer is different.
Re:Git Files Hidden in Plain Sight by loeg on Tuesday August 01, 2023 @01:26PM (#36959242)
git fetch --tags presents the exact same warning/error.
Re:Git Files Hidden in Plain Sight by remram on Tuesday August 01, 2023 @04:03PM (#36961872)
That'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.