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
If I have pretty-quick --staged as a pre-commit hook, and I commit some files directly, I get a weird state where the commit and the working tree end up with the formatted files, but the index still has the old, unformatted files.
[nelhage@monolithique:~/code/pretty-quick-repro]$ echo$'function f( a, b) {}'>> main.js [nelhage@monolithique:~/code/pretty-quick-repro]$ git ci main.js -m 'testing'🔍 Finding changed files since git revision 41b9102. 🎯 Found 1 changed file. ✍ Fixing up main.js. EvEverythingsiswawesome! s [master 8601415] testing 1 file changed, 1 insertion(+) [nelhage@monolithique:~/code/pretty-quick-repro]$ git --no-pager diff HEAD[nelhage@monolithique:~/code/pretty-quick-repro]$ git --no-pager diff diff --git a/main.js b/main.jsindex 56ddb1c..f3cb734 100644--- a/main.js+++ b/main.js@@ -1,4 +1,4 @@ function testFunc(a, b) { return a + b; }-function f( a, b) {}+function f(a, b) {}[nelhage@monolithique:~/code/pretty-quick-repro]$ git --no-pager diff --cached diff --git a/main.js b/main.jsindex f3cb734..56ddb1c 100644--- a/main.js+++ b/main.js@@ -1,4 +1,4 @@ function testFunc(a, b) { return a + b; }-function f(a, b) {}+function f( a, b) {}[nelhage@monolithique:~/code/pretty-quick-repro]$ git statusOn branch masterChanges to be committed: (use "git restore --staged <file>..." to unstage) modified: main.jsChanges not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: main.js
The text was updated successfully, but these errors were encountered:
If I have
pretty-quick --staged
as a pre-commit hook, and I commit some files directly, I get a weird state where the commit and the working tree end up with the formatted files, but the index still has the old, unformatted files.Starting from https://github.com/nelhage/pretty-quick-bugreport, we can see this as follows:
The text was updated successfully, but these errors were encountered: