mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 16:44:42 +04:00
improvements/fixes after code review
This commit is contained in:
parent
e36cdc227c
commit
f6c6b6c55f
3 changed files with 2 additions and 13 deletions
|
|
@ -372,12 +372,8 @@ def run(
|
|||
):
|
||||
return 0
|
||||
# prevent pushing staged files not committed (#2486)
|
||||
if (
|
||||
args.hook_stage == 'pre-push' and git.get_staged_files()
|
||||
):
|
||||
logger.error(
|
||||
'Staged files found. Please commit before pushing',
|
||||
)
|
||||
if args.hook_stage == 'pre-push' and git.get_staged_files():
|
||||
logger.error('Staged files found. Please commit before pushing')
|
||||
return 1
|
||||
# Expose prepare_commit_message_source / commit_object_name
|
||||
# as environment variables for the hooks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue