Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: build/git-hooks/pre-commit

Issue 203463010: Remove "bashism" from plain shell script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/git-hooks/pre-commit
diff --git a/build/git-hooks/pre-commit b/build/git-hooks/pre-commit
index 1153649842c3fc765765b18a93c397ba5b5012d7..a39be2202cef12427192d6ac174fe3dec4d7f52d 100755
--- a/build/git-hooks/pre-commit
+++ b/build/git-hooks/pre-commit
@@ -23,8 +23,8 @@ EOF
exit 1
fi
-if [[ -n "$(git ls-files .gitmodules)" &&
- -n "$(git diff-index --cached HEAD .gitmodules)" ]]; then
+if [ -n "$(git ls-files .gitmodules)" ] &&
+ [ -n "$(git diff-index --cached HEAD .gitmodules)" ]; then
cat <<EOF 1>&2
You are trying to commit a change to .gitmodules. That is not allowed.
To make changes to submodule names/paths, edit DEPS.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698