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

Unified Diff: crup-runner.sh

Issue 12330179: Set default configs for ignoring submodule diffs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 10 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: crup-runner.sh
diff --git a/crup-runner.sh b/crup-runner.sh
index f14657f8c109d1f6d4df4abed83ab72bdd9a66ad..c8f5822c22a13852f6c2f3a7259cd0af80226ea1 100755
--- a/crup-runner.sh
+++ b/crup-runner.sh
@@ -65,6 +65,10 @@ process_submodule () {
fi
git config "submodule.$1.update" $update_policy
fi
+ ignore_policy=$(git config --get "submodule.$1.ignore")
+ if [ -z "$ignore_policy" ]; then
+ git config "submodule.$1.ignore" all
+ fi
if [ "$update_policy" != "none" ]; then
update_submodule_url "$1"
echo "$solution/$1"
@@ -86,6 +90,13 @@ if [ "$solution" = "$1" ]; then
exit 0
fi
+ # Set default behavior to ignore diffs in submodule checkouts
+ diff_policy=$(git config --get "diff.ignoreSubmodules")
+ if [ -z "$diff_policy" ]; then
+ git config diff.ignoreSubmodules all
+ fi
+
+ # Don't "pull" if checkout is not on a named branch
shift
if test $# -ne 0; then
update_toplevel "$@"
« 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