-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to solve
git: Not a valid object name HEAD^
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,10 @@ jobs: | |
git config user.email "[email protected]" | ||
git config user.name "Test User" | ||
git commit --allow-empty -m "Initial empty commit" | ||
echo 'def hello(): return "Hello, World!"' > test.py | ||
echo 'def hello(): return "Hello, World!"' > test.py | ||
git add test.py | ||
git commit -m "Add test.py file" | ||
echo 'def hello(): return "Hello, World!"' > test.py | ||
- name: Run Darker without working-directory (should not reformat) | ||
uses: ./ | ||
|
@@ -27,6 +28,7 @@ jobs: | |
with: | ||
options: --check --diff -vvv | ||
src: test.py | ||
revision: HEAD | ||
|
||
- name: Check if file was not reformatted | ||
run: | | ||
|
@@ -41,6 +43,7 @@ jobs: | |
options: --check --diff -vvv | ||
src: test.py | ||
working-directory: ${{ runner.temp }}/test-repo | ||
revision: HEAD | ||
|
||
- name: Verify file was reformatted | ||
run: | | ||
|
@@ -60,6 +63,7 @@ jobs: | |
options: --check --diff -vvv | ||
src: test.py | ||
working-directory: ${{ runner.temp }}/non-existent-dir | ||
revision: HEAD | ||
|
||
- name: Check if file was not reformatted with incorrect working-directory | ||
run: | | ||
|