Skip to content

Commit a1d59c6

Browse files
committed
improve directory diff script
1 parent c38a094 commit a1d59c6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/scripts/test-directory-unchanged.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ set -ex
33

44
cd "$(dirname "$0")/../../$1"
55

6+
# notify git about untracked files
7+
# add -f to detect even ignored files
8+
git add -N .
9+
610
# display overview of changed files
7-
git status
11+
git status .
812

9-
# display & detect all changes
10-
git add . -N && git diff --cached -a --exit-code . && git diff -a --exit-code .
13+
# display diff of working directory vs HEAD commit and set exit code
14+
git diff -a --exit-code HEAD .

0 commit comments

Comments
 (0)