mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 15:33:51 +00:00
Allow tests to run without user config
This commit is contained in:
parent
a1710a28f6
commit
db092c1955
@ -100,6 +100,12 @@ void test_refs_branches_create__default_reflog_message(void)
|
|||||||
git_reflog *log;
|
git_reflog *log;
|
||||||
const git_reflog_entry *entry;
|
const git_reflog_entry *entry;
|
||||||
git_signature *sig;
|
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));
|
cl_git_pass(git_signature_default(&sig, repo));
|
||||||
|
|
||||||
|
@ -218,6 +218,12 @@ void test_refs_branches_move__default_reflog_message(void)
|
|||||||
git_reflog *log;
|
git_reflog *log;
|
||||||
const git_reflog_entry *entry;
|
const git_reflog_entry *entry;
|
||||||
git_signature *sig;
|
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));
|
cl_git_pass(git_signature_default(&sig, repo));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user