Description
Provide an option to autostash uncommitted changes when running the pre-push hook to avoid side-effects.
What problem it is solving?
We use the pre-commit hook to run linters only on the changed files, and the pre-push hook to run linters on all files and tests.
However, since uncommitted changes aren't staged when the pre-push hook runs, the linters sometimes fail or pass unexpectedly.
Description
Provide an option to autostash uncommitted changes when running the
pre-pushhook to avoid side-effects.What problem it is solving?
We use the
pre-commithook to run linters only on the changed files, and thepre-pushhook to run linters on all files and tests.However, since uncommitted changes aren't staged when the
pre-pushhook runs, the linters sometimes fail or pass unexpectedly.