Closed wincent closed 8 years ago
Cross-referencing #50, which involves another potential dumb mistake (amending a published commit).
pre-commit
hook can check to see whether masochist:2:last-indexed-hash
is an ancestor of HEAD
(with git merge-base HEAD
). This will prevent us from amending commits that have been indexed locally.git push
time (unless you force), so that should stop mistakes propagating to the remote, even without a hook.However, we can do better than that:
pre-push
hook can tag all pushes to content
remote, so that we know when remote was last-indexed too.
Just accidentally created a file at
/content/wiki/Ferret.vim
instead of/content/wiki/Ferret.md
. We should catch that kind of mistake with a hook.Update: mitigated through use of
script/new-article
script.