Skip to content

Commit b2030a6

Browse files
committed
Make pre-commit hook pass if playground is not staged
Previously the pre-commit hook stopped you commiting if you had any changes in the playground even if those changes weren't staged for commit. This meant you had to totally reset your playground even if you weren't about to commit it. Now we check if the playground is staged for commit, so if the playground is modified but not staged for commit you can still commit your other changes
1 parent 206a18b commit b2030a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module PreCommit
2323
end
2424

2525
def changed_files
26-
@changed_files ||= %x(git diff-index --abbrev --name-only HEAD).lines.map(&:chomp)
26+
@changed_files ||= %x(git diff --cached --name-only HEAD).lines.map(&:chomp)
2727
end
2828
end
2929

0 commit comments

Comments
 (0)