[windows] skip

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 git commit -m 'initial commit'

exec lefthook run edit_file
exec git add -A
exec lefthook run edit_file
exec git status --short
stdout 'AM newfile.txt'

exec git commit -m 'test hide unstaged changes'
exec git status --short
stdout 'M newfile.txt'

-- lefthook.yml --
min_version: 1.1.1
pre-commit:
  commands:
    edit_file:
      run: echo newline >> file.txt
      stage_fixed: true

edit_file:
  commands:
    echo:
      run: echo newline >> newfile.txt

-- file.txt --
firstline
