As a result, the whole file has been committed unexpectedly.
Given that, this PR fixes the issue by adding --porcelain, an option that makes the output machine-readable, to git status command.
With this fix, I see now lefthook properly hides partially staged files as below:
:zap: Summary
I faced an error like below (with LEFTHOOK_VERBOSE=true) when I partially added a file by
git add -p
and then executedgit commit
:As a result, the whole file has been committed unexpectedly.
Given that, this PR fixes the issue by adding
--porcelain
, an option that makes the output machine-readable, togit status
command. With this fix, I see nowlefthook
properly hides partially staged files as below::ballot_box_with_check: Checklist