You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: safer handling of partially staged files (with fix) (#33)
* feat: safer handling of partially staged files (#29)
+ Partially staged files are not re-staged
+ Non-zero exit code upon reformatting partially staged file
+ Update README
* Fixes#30 handling of partially staged files
The git command checking for unstaged changes should not have been including a revision.
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,8 @@ In `package.json`'s `"scripts"` section, add:
74
74
75
75
Pre-commit mode. Under this flag only staged files will be formatted, and they will be re-staged after formatting.
76
76
77
+
Partially staged files will not be re-staged after formatting and pretty-quick will exit with a non-zero exit code. The intent is to abort the git commit and allow the user to amend their selective staging to include formatting fixes.
78
+
77
79
### `--branch`
78
80
79
81
When not in `staged` pre-commit mode, use this flag to compare changes with the specified branch. Defaults to `master` (git) / `default` (hg) branch.
0 commit comments