Skip to content

Document the current capabilities and limitations of pre-commit hooks #237

Closed
@grempe

Description

@grempe

Referencing pull request: #235 (comment)

There is a lack of documentation regarding what pre-commit hooks (and probably others as well) can do as a result of implementation details of overcommit.

For example, pre-commit hooks implemented in overcommit cannot have side effects. You cannot modify, add, remove files from within a pre-commit hook since the workflow for running that hook involves stashing all unindexed content in the work dir, doing a git reset --hard, and stash apply. These actions overwrite any changes that a script might have made.

Currently this behavior is undocumented.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions