exec git init
exec lefthook install
exec git config user.email "you@example.com"
exec git config user.name "Your Name"
exec git add -A
exec lefthook run -f all
stdout 'a.txt b.txt dir/a.txt dir/b.txt lefthook.yml'
exec lefthook run -f regexp
stdout 'dir/a.txt dir/b.txt lefthook.yml'
exec lefthook run -f array
stdout 'dir/a.txt dir/b.txt'

-- lefthook.yml --
skip_output:
  - skips
  - meta
  - summary
  - execution_info
all:
  commands:
    echo:
      run: echo {staged_files}

regexp:
  commands:
    echo:
      run: echo {staged_files}
      exclude: '^(a.txt|b.txt)'

array:
  jobs:
    - run: echo {staged_files}
      exclude:
        - a.txt
        - b.txt
        - '*.yml'

-- a.txt --
a

-- b.txt --
b

-- dir/a.txt --
dir-a

-- dir/b.txt --
dir-b


