We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 606ea2a commit 81a8cf0Copy full SHA for 81a8cf0
1 file changed
.github/scripts/test-directory-unchanged.sh
@@ -1,13 +1,16 @@
1
#!/bin/sh
2
set -ex
3
4
-cd "$(dirname "$0")/../../$1"
+# use the repo root directory as "--git-dir"
5
+cd "$(dirname "$0")/../.."
6
+
7
+dir="$1"
8
9
# notify git about untracked (except ignored) files
-git add -N .
10
+git add -N "$dir"
11
12
# display overview of changed files
-git status .
13
+git status "$dir"
14
15
# display diff of working directory vs HEAD commit and set exit code
-git diff -a --exit-code HEAD .
16
+git diff -a --exit-code HEAD "$dir"
0 commit comments