Skip to content

Commit

Permalink
Improved pre-commit.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Defelo committed Apr 2, 2022
1 parent 4b46990 commit 6a4fe78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ save() {
}

restore() {
git submodule foreach "git checkout \$(cat .head.ref) && rm .head.ref && /bin/bash $SELF restore"
git submodule foreach "git restore . && git checkout \$(cat .head.ref) && rm .head.ref && /bin/bash $SELF restore"

git apply -3 --allow-empty .staged.patch && rm .staged.patch || echo "Warning: Could not restore staged changes in $(pwd)"
git apply --allow-empty .unstaged.patch && rm .unstaged.patch || echo "Warning: Could not restore unstaged changes in $(pwd)"
Expand Down

0 comments on commit 6a4fe78

Please sign in to comment.