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
When removing the first line from a file, the pre-commit hook fails with the following error, preventing commit.
[test-clang-format-repo]$ git commit -m "Test file remove first line"
error: start line should be at least 1
The apply-format script failed.
[test-clang-format-repo]$
Steps to reproduce:
mkdir test-clang-format-repo && cd test-clang-format-repo && git init .
accept the suggested correction (to the indentation)
edit TestFile.cc and remove the first (empty) line
git add 'TestFile.cc' && git commit -m "remove first line"
Expected behaviour:
commit is successful
Actual behaviour:
error: start line should be at least 1
The apply-format script failed.
[test-clang-format-repo]$ git status
On branch main
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: Testfile.cc
Change is still stashed.
The text was updated successfully, but these errors were encountered:
Issue:
When removing the first line from a file, the pre-commit hook fails with the following error, preventing commit.
Steps to reproduce:
mkdir test-clang-format-repo && cd test-clang-format-repo && git init .
/path/to/this/repo/git-pre-commit-format install
TestFile.cc
with:(note first line is empty)
git add 'TestFile.cc' && git commit -m "test file"
TestFile.cc
and remove the first (empty) linegit add 'TestFile.cc' && git commit -m "remove first line"
Expected behaviour:
Actual behaviour:
Change is still stashed.
The text was updated successfully, but these errors were encountered: