Skip to content

Commit 2a7cc2f

Browse files
Byronweihanglo
authored andcommitted
Prevent false positives when checking for changes in src/doc.
When changing cargo versions from stable to nightly, it's possible that the Cargo.lock format changes ever so slightly. This leaves the `Cargo.lock` file changed which is picked up by `git status`. This patch adjusts the `git status` invocation to limit itself to the CWD.
1 parent e02c225 commit 2a7cc2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ci/validate-man.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55

66
cd src/doc
77

8-
changes=$(git status --porcelain)
8+
changes=$(git status --porcelain -- .)
99
if [ -n "$changes" ]
1010
then
1111
echo "git directory must be clean before running this script."
@@ -14,10 +14,10 @@ fi
1414

1515
./build-man.sh
1616

17-
changes=$(git status --porcelain)
17+
changes=$(git status --porcelain -- .)
1818
if [ -n "$changes" ]
1919
then
20-
echo "Detected changes in man pages:"
20+
echo "Detected changes of man pages in src/doc:"
2121
echo "$changes"
2222
echo
2323
echo "Please run './build-man.sh' in the src/doc directory to rebuild the"

0 commit comments

Comments
 (0)