autocommit.git_hooks

Git Hooks

This module contains the git hooks that are called by git when certain actions are performed.

They actually spawn a subprocess that runs the autocommit command. The reason I designed it this way is to allow for the command to later be run with isolation (with bubblewrap)

Functions

git_post_commit()

Update the RAG database after a commit

git_prepare_commit_msg(message_file, ...)

Hook for prepare-commit-msg

autocommit.git_hooks.git_prepare_commit_msg(message_file: Path, commit_type: str, sha: str)[source]

Hook for prepare-commit-msg

This hook is called by git-commit when preparing the default commit message.

autocommit.git_hooks.git_post_commit()[source]

Update the RAG database after a commit