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

Unified Diff: enter_chroot.sh

Issue 6312069: Make git config optional to allow multiple calls to enter_chroot at the same time. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix 80 char Created 9 years, 11 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 | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: enter_chroot.sh
diff --git a/enter_chroot.sh b/enter_chroot.sh
index 29ef561291cfc01f3ccc0d09c2c96a0486c8c60c..7679d9c5ecaabf66f93c3f96635f5d1fc726e2ff 100755
--- a/enter_chroot.sh
+++ b/enter_chroot.sh
@@ -27,6 +27,8 @@ DEFINE_string chrome_root "" \
DEFINE_string chrome_root_mount "/home/$USER/chrome_root" \
"The mount point of the chrome broswer source in the chroot."
+DEFINE_boolean git_config $FLAGS_TRUE \
+ "Config git to work with your user/pass in the chroot."
DEFINE_boolean official_build $FLAGS_FALSE \
"Set CHROMEOS_OFFICIAL=1 for release builds."
DEFINE_boolean mount $FLAGS_FALSE "Only set up mounts."
@@ -326,10 +328,13 @@ if [ -d "$HOME/.subversion" ]; then
fi
# Configure committer username and email in chroot .gitconfig
-git config -f ${FLAGS_chroot}/home/${USER}/.gitconfig --replace-all user.name \
- "$(cd /tmp; git var GIT_COMMITTER_IDENT | sed -e 's/ *<.*//')"
-git config -f ${FLAGS_chroot}/home/${USER}/.gitconfig --replace-all user.email \
- "$(cd /tmp; git var GIT_COMMITTER_IDENT | sed -e 's/.*<\([^>]*\)>.*/\1/')"
+if [ $FLAGS_git_config -eq $FLAGS_TRUE ]; then
+ git config -f ${FLAGS_chroot}/home/${USER}/.gitconfig --replace-all \
+ user.name "$(cd /tmp; git var GIT_COMMITTER_IDENT | sed -e 's/ *<.*//')"
+ git config -f ${FLAGS_chroot}/home/${USER}/.gitconfig --replace-all \
+ user.email "$(cd /tmp; git var GIT_COMMITTER_IDENT | \
+ sed -e 's/.*<\([^>]*\)>.*/\1/')"
+fi
# Run command or interactive shell. Also include the non-chrooted path to
# the source trunk for scripts that may need to print it (e.g.
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698