summaryrefslogtreecommitdiff
path: root/tests/refs
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2014-01-30 16:10:18 -0800
committerBen Straub <bs@github.com>2014-01-30 16:10:18 -0800
commitdb092c1955ff5079d8ca475bbe1d6b0da782b38e (patch)
tree104e0fadb7103e10ea2bf7a6376214d504a773da /tests/refs
parenta1710a28f684298f79a0bab08b0b8930c1d57cf0 (diff)
downloadlibgit2-db092c1955ff5079d8ca475bbe1d6b0da782b38e.tar.gz
Allow tests to run without user config
Diffstat (limited to 'tests/refs')
-rw-r--r--tests/refs/branches/create.c6
-rw-r--r--tests/refs/branches/move.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/refs/branches/create.c b/tests/refs/branches/create.c
index 06dcca591..abe5f5940 100644
--- a/tests/refs/branches/create.c
+++ b/tests/refs/branches/create.c
@@ -100,6 +100,12 @@ void test_refs_branches_create__default_reflog_message(void)
git_reflog *log;
const git_reflog_entry *entry;
git_signature *sig;
+ git_config *cfg;
+
+ cl_git_pass(git_repository_config(&cfg, repo));
+ cl_git_pass(git_config_set_string(cfg, "user.name", "Foo Bar"));
+ cl_git_pass(git_config_set_string(cfg, "user.email", "foo@example.com"));
+ git_config_free(cfg);
cl_git_pass(git_signature_default(&sig, repo));
diff --git a/tests/refs/branches/move.c b/tests/refs/branches/move.c
index 3d2c815ae..6c6dbbe21 100644
--- a/tests/refs/branches/move.c
+++ b/tests/refs/branches/move.c
@@ -218,6 +218,12 @@ void test_refs_branches_move__default_reflog_message(void)
git_reflog *log;
const git_reflog_entry *entry;
git_signature *sig;
+ git_config *cfg;
+
+ cl_git_pass(git_repository_config(&cfg, repo));
+ cl_git_pass(git_config_set_string(cfg, "user.name", "Foo Bar"));
+ cl_git_pass(git_config_set_string(cfg, "user.email", "foo@example.com"));
+ git_config_free(cfg);
cl_git_pass(git_signature_default(&sig, repo));