Savepoint Project

6 points by Helithumper


joshka

jj util snapshot is a good reasonable approach to most of the impetus for this.

The rationale for it is explained better on the youtube vid: https://www.youtube.com/watch?v=ZBa3BK4Efcw

roryokane

I found the documentation for this very confusing – for example, how does it know “when you fix errors”? It doesn’t help that there’s a syntax error that prevents a diagram from being rendered.

After reading the code, I see it’s a very simple program that combines a file watcher with two external tools: git commit and a custom command you give that tells it whether to run git commit. For example, savepoint --filetype 'rs' cargo test runs the equivalent of this shell script (file-watcher is made up but there are multiple tools like it):

file-watcher --glob '**/*.rs' --on-change-exec '
  cargo test &&
  git commit -a -m "SAVEPOINT REACHED!"
'

So Savepoint doesn’t commit only “when you fix errors”, but also whenever you make a code change that doesn’t break tests.