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

Unified Diff: tests/test-lib.sh

Issue 18053009: Fix git tests to work regardless of global gitconfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: example.com Created 7 years, 6 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: tests/test-lib.sh
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index fc3874e15f59202814a0ef78e90af6a0fd931c0b..4ce05cf82069468d46a309e1e05aede67685ba51 100755
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -48,6 +48,11 @@ setup_gitsvn() {
# There appears to be no way to make git-svn completely shut up, so we
# redirect its output.
git svn -q clone -s $REPO_URL git-svn >/dev/null 2>&1
+ (
+ cd git-svn
+ git config user.name 'TestDood'
+ git config user.email 'TestDood@example.com'
+ )
}
# Set up a git-svn checkout of the repo and apply merge commits
@@ -60,6 +65,8 @@ setup_gitsvn_submodule() {
sed s/^.*:// | xargs`
(
cd git-svn-submodule
+ git config user.name 'TestDood'
+ git config user.email 'TestDood@example.com'
echo 'merge-file line 1' > merge-file
git add merge-file; git commit -q -m 'First non-svn commit on master'
git checkout -q refs/remotes/trunk
@@ -81,6 +88,8 @@ setup_initgit() {
(
cd gitrepo
git init -q
+ git config user.name 'TestDood'
+ git config user.email 'TestDood@example.com'
echo "test" > test
git add test
git commit -qam "initial commit"
@@ -97,6 +106,11 @@ setup_gitgit() {
echo "Setting up test git repo..."
rm -rf git-git
git clone -q $GITREPO_URL git-git
+ (
+ cd git-git
+ git config user.name 'TestDood'
+ git config user.email 'TestDood@example.com'
+ )
}
cleanup() {
« 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