“The implication here is that any code committed to a public repository may be accessible forever as long as there is at least one fork of that repository,” the report’s authors claim.

Am I dumb or is this exactly the purpose of forks? I feel like I’m missing something.

  • Dave@lemmy.nz
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 months ago

    Thanks, I think that explains it a bit more. It is unexpected to me, as a non-git expert, and I’m sure many others.

    • Morphit @feddit.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      I guess the funny thing is that each Git commit is internally just a file. Branches and tags are just links to specific commit files and of course commits link to their parents. If a branch gets deleted or jumped back to a previous commit, the orphaned commits are still left in the filesystem. Various Git actions can trigger a garbage collection, but unless you generate huge diffs, they usually stick around for a really long time. Determining if a commit is orphaned is work that Git usually doesn’t bother doing. There’s also a reflog that can let you recover lost commits if you make a mistake.