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

Unified Diff: git-hooks/pre-commit

Issue 192833005: Silence git-hooks/pre-commit in the absence of .gitmodules. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/build/
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: git-hooks/pre-commit
===================================================================
--- git-hooks/pre-commit (revision 249215)
+++ git-hooks/pre-commit (working copy)
@@ -23,7 +23,8 @@
exit 1
fi
-if test "$(git diff-index --cached HEAD .gitmodules)"; then
+if [[ -n "$(git ls-files .gitmodules)" &&
Ami GONE FROM CHROMIUM 2014/03/10 19:04:49 Sample noise that this silences: fatal: ambiguous
+ -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