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 status --short
exec git commit -m 'test stage_fixed'
exec git status --short
! stdout .

exec lefthook run pre-commit --force --no-stage-fixed
exec git status --short
stdout ' M \[file\].js'
stdout ' M file.txt'

-- lefthook.yml --
min_version: 1.1.1
pre-commit:
  commands:
    edit_file:
      run: |
        echo newline >> "[file].js"
        echo newline >> file.txt
      stage_fixed: true

-- file.txt --
sometext

-- [file].js --
somecode
