-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
Description
describe your issue
Occasionally I interrupt pre-commit in the midst of its checks, and have to apply the stashed changes manually, e.g.
$ git commit
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /Users/ichamberlain/.cache/pre-commit/patch1645134328-41500.
^C⏎
Interrupted (^C): KeyboardInterrupt:
Check the log at /Users/ichamberlain/.cache/pre-commit/pre-commit.log
Typically to do this I just run
git apply /Users/ichamberlain/.cache/pre-commit/patch1645134328-41500which works fine, but it is mildly annoying to to select the filename from the stash message, since it ends with a period (.). As a result, I frequently end up trying to run a command like this, which obviously fails:
$ git apply /Users/ichamberlain/.cache/pre-commit/patch1645134328-41500.
error: can't open patch '/Users/ichamberlain/.cache/pre-commit/patch1645134328-41500.': No such file or directory
My simple suggestion: remove the period at the end of the "Stashing unstaged files" message to make it slightly easier to select. I can probably open a PR myself if desired, since I imagine this is a trivial change to make.
pre-commit --version
pre-commit 2.17.0
.pre-commit-config.yaml
# N/A and specific to my organization~/.cache/pre-commit/pre-commit.log (if present)
No response
Reactions are currently unavailable