-
-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor test-git-no-uncommitted-changes to independent script
- Loading branch information
1 parent
82a439a
commit b7ae258
Showing
3 changed files
with
12 additions
and
8 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env sh | ||
# Test that there is no uncommitted changes in the repository. Return failure if there is. | ||
# Can also be invoked with `make test-git-no-uncommitted-changes` from top level. | ||
UNCOMMITTED="$(git status --porcelain)"; | ||
if [ -n "$UNCOMMITTED" ]; then | ||
echo "Error: the git repo has uncommitted changes:"; | ||
echo "$UNCOMMITTED"; | ||
echo; | ||
exit 1; | ||
fi |