Skip to content

Latest commit

 

History

History
92 lines (65 loc) · 2.78 KB

CHANGELOG.md

File metadata and controls

92 lines (65 loc) · 2.78 KB

Change log

master (unreleased)

  • Commit Add shell escapig for filenames. Thanks @asottile

  • PR Now relative path to scripts supported. Thanks @AlexeyMatskevich

  • Commit Option extends for top level config added. Now you can merge some settings from different places:

extends: $HOME/work/lefthook-extend.yml
  • Commit Add examples to generated lefthook.yml

0.6.3 (2019-07-15)

  • Commit Add -a means aggresive strategy for install command
lefthook install -a # clear .git/hooks dir and reinstall lefthook hooks
  • Commit Add Lefthook version indicator for commands and script execution

  • Commit Remove npx as dependency from node wrapper

Now we will call directly binary from ./node_modules

  • Commit Add -f means force strategy for install command
lefthook install -f # reinstall lefthook hooks without sync info check
  • PR #27 Move LEFTHOOK env check in hooks files

Now if LEFTHOOK=0 we will not call the binary file

Add shortcut {push_files}

pre-commit:
  commands:
    rubocop:
      run: rubocop {push_files}

It same as:

pre-commit:
  commands:
    rubocop:
      files: git diff --name-only HEAD @{push} || git diff --name-only HEAD master
      run: rubocop {push_files}
  • Commit Add min_version option

You can mark your config for minimum Lefthook version:

min_version: 0.6.1

0.6.0 (2019-07-10)

  • PR #24 Wrap run command in shell context.

Now in run option available sh syntax.

pre-commit:
  commands:
    bashed:
      run: rubocop -a && git add

Will be executed in this way:

sh -c "rubocop -a && git add"
  • PR #23 Search Lefthook in Gemfile.

Now it's possible to use Lefthook from Gemfile.

# Gemfile

gem 'lefthook'