Class: Overcommit::HookContext::PreCommit

Inherits:
Base
  • Object
show all
Includes:
Helpers::FileModifications, Helpers::StashUnstagedChanges
Defined in:
lib/overcommit/hook_context/pre_commit.rb

Overview

Contains helpers related to contextual information used by pre-commit hooks.

This includes staged files, which lines of those files have been modified, etc. It is also responsible for saving/restoring the state of the repo so hooks only inspect staged changes.

Method Summary

Methods included from Helpers::FileModifications

#amendment?, #modified_files, #modified_lines_in_file

Methods included from Helpers::StashUnstagedChanges

#cleanup_environment, #initial_commit?, #setup_environment

Methods inherited from Base

#all_files, #cleanup_environment, #execute_hook, #hook_class_name, #hook_script_name, #hook_type_name, #initialize, #input_lines, #input_string, #modified_files, #post_fail_message, #setup_environment

Constructor Details

This class inherits a constructor from Overcommit::HookContext::Base