2 # Hacky little helper called from edit/ and sandbox/ apps to save a snapshot
3 # of lesson/ using git.
6 test -d lesson
/.git ||
exit 0 # give up if it's not a git repo
9 # explicitly say '--all' for git 1.9
11 # bug in git: git diff -q messes up --exit-code
12 git
diff HEAD
--exit-code >/dev
/null || git commit
-a -m .
>/dev
/null