3 ms·
Same way strings in python are immutable yet still allow you to delete and recreate. Git repos are not blockchains
by ythn 9y ago
Same way strings in python are immutable yet still allow you to delete and recreate. Git repos are not blockchains
- sigjuice 9y agoI don't know enough about blockchains to understand the phrase git repos are not blockchains. If I say git log 191edc5e2e515aab1075a3f0ef23599e80be5f59 anywhere at any time it means the same thing each and every time. That is not the case with git log v0.0.1
- avar 9y agoThe v0.0.1 is just a label for the tag object itself. E.g. if you clone git.git you can see a tag for v2.16.2, the latest release. That you can re-create point to something entirely different. But if you do: $ git rev-parse v2.16.2 86aabcca24951ccfb9392014c8a379992434a7df $ git rev-parse v2.16.2^{commit} ffa952497288d29d94b16675c6789ef83850def3 You can see that the annotated tag object (GPG signature and all) is really called 86aabcca24951ccfb9392014c8a379992434a7df, and that it points to a commit ffa952497288d29d94b16675c6789ef83850def3. That 86aabcca... is the immutable part of tags, just as commit objects are immutable. Note that this only applies to annotated tags, lightweight tags just point to the commit object themselves, so they're really just a sort of branch name that git treats differently in not ever advancing it to another commit.