Allow tests to run without user config

This commit is contained in:
Ben Straub 2014-01-30 16:10:18 -08:00
parent a1710a28f6
commit db092c1955
2 changed files with 12 additions and 0 deletions

View File

@ -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));

View File

@ -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));