summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-11-18 23:39:43 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-11-18 23:39:43 +0000
commit11d33df802b00acf5ef1e437c12751b3e6a5d39b (patch)
tree553a32212cd108dfd3602b095414b712d88aab47 /tests
parent646a94be5f01001e09796d03d5f6c077b21b9532 (diff)
parente226ad8f2fd76211809cf7b381fb55bb600df82f (diff)
downloadlibgit2-11d33df802b00acf5ef1e437c12751b3e6a5d39b.tar.gz
Merge branch 'tiennou/fix/logallrefupdates-always'
Diffstat (limited to 'tests')
-rw-r--r--tests/refs/reflog/reflog.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/refs/reflog/reflog.c b/tests/refs/reflog/reflog.c
index ec251da08..3a6c97c44 100644
--- a/tests/refs/reflog/reflog.c
+++ b/tests/refs/reflog/reflog.c
@@ -422,6 +422,28 @@ void test_refs_reflog_reflog__logallrefupdates_bare_set_false(void)
assert_no_reflog_update();
}
+void test_refs_reflog_reflog__logallrefupdates_bare_set_always(void)
+{
+ git_config *config;
+ git_reference *ref;
+ git_reflog *log;
+ git_oid id;
+
+ cl_git_pass(git_repository_config(&config, g_repo));
+ cl_git_pass(git_config_set_string(config, "core.logallrefupdates", "always"));
+ git_config_free(config);
+
+ git_oid_fromstr(&id, "be3563ae3f795b2b4353bcce3a527ad0a4f7f644");
+ cl_git_pass(git_reference_create(&ref, g_repo, "refs/bork", &id, 1, "message"));
+
+ cl_git_pass(git_reflog_read(&log, g_repo, "refs/bork"));
+ cl_assert_equal_i(1, git_reflog_entrycount(log));
+ cl_assert_equal_s("message", git_reflog_entry_byindex(log, 0)->msg);
+
+ git_reflog_free(log);
+ git_reference_free(ref);
+}
+
void test_refs_reflog_reflog__logallrefupdates_bare_unset(void)
{
git_config *config;