snowfs icon indicating copy to clipboard operation
snowfs copied to clipboard

Adding support for Snow hooks

Open daniellanner opened this issue 4 years ago • 1 comments

Similar to git, SnowFS offers a default directory for adding custom hooks to be executed upon calling repository commands. This directory is located at $PROJECTDIR/.snow/hooks.

Typical git hooks are scripts, named and titularly executed as:

  • applypatch-msg
  • commit-msg
  • fsmotir-watchman
  • post-commit
  • post-update
  • pre-applypatch
  • pre-commit
  • pre-merge
  • pre-merge-commit
  • prepare-commit-msg
  • pre-push
  • pre-rebase
  • pre-receive
  • update

Currently these files are not executed when performing the matched action.

At least a subset of the above directives could be implemented to be called when the appropriate action is executed. Example implementations can be existing git hooks.

daniellanner avatar Feb 09 '21 05:02 daniellanner

I just leave the following comments and ideas here. For Unix-based systems, it seems to be a no-brainer to implement it. A platform-independent solution is a little bit more tricky. Things to clarify:

  1. platform-independent she-bang support
  2. I never liked, that Git hooks are not part of the cloning process and must be separately installed. If SnowFS will support remote clone/push, I would like to plan ahead for this feature

sebastianrath avatar Feb 11 '21 03:02 sebastianrath