View on
MetaCPAN
Gustavo Leite de Mendonça Chaves > Git-Hooks > Git::Hooks::CheckRewrite

Download:
Git-Hooks-2.1.7.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: v2.1.7   Source  

NAME ^

Git::Hooks::CheckRewrite - Git::Hooks plugin for checking against unsafe rewrites

VERSION ^

version 2.1.7

DESCRIPTION ^

This Git::Hooks plugin hooks itself to the pre-rebase hook to guarantee that it is safe in the sense that no rewritten commit is reachable by other branch than the one being rebased.

It also hooks itself to the pre-commit and the post-commit hooks to detect unsafe git commit --amend commands after the fact. An amend is unsafe if the original commit is still reachable by any branch after being amended. Unfortunately git still does not provide a way to detect unsafe amends before committing them.

To enable it you should add it to the githooks.plugin configuration option:

    git config --add githooks.plugin CheckRewrite

NAME ^

Git::Hooks::CheckRewrite - Git::Hooks plugin for checking against unsafe rewrites

CONFIGURATION ^

There's no configuration needed or provided.

REFERENCES ^

Here are some references about what it means for a rewrite to be unsafe and how to go about detecting them in git:

AUTHOR ^

Gustavo L. de M. Chaves <gnustavo@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2017 by CPqD <www.cpqd.com.br>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: