News for hackers. Stuff that matters.
Re:Extremely Linear Git History by jstimpfle on Tuesday November 22, 2022 @07:14AM (#33704921)
You could automatically tag each uploaded commit with a number drawn from a sequence - using a git post-update hook. The only problem is that this centralizes the process. It's not possible to have fully "blessed" commits without pushing them first. And that's how SVN works, too.
Re:Extremely Linear Git History by loeg on Tuesday November 22, 2022 @05:14PM (#33712321)
For local repositories, you can do it as a post-commit hook.

In the hook:

  prefix=whatever
  old=$(git rev-parse HEAD)
  new=$(brute force $prefix)
  git update-ref -m "chose prefix $prefix" --create-reflog HEAD "$new"
Of course, it's pretty silly and slow.