Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schreiber <schreiber.arthur@googlemail.com>2015-09-13 17:32:24 +0300
committerArthur Schreiber <schreiber.arthur@googlemail.com>2015-09-13 17:32:24 +0300
commit548cb334344a592678778e0357f3f09000d6cf5d (patch)
treec2aefade31ae105f2dbd213ba7b2a0fa5437136f /tests/config
parent1e80bf27ea453993006837040ada28241806e6f7 (diff)
Don't free config in `git_transaction_commit`.
The config is not owned by the transaction, so please don’t free it.
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/write.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/config/write.c b/tests/config/write.c
index 3d9b1a16a..9ad11ab27 100644
--- a/tests/config/write.c
+++ b/tests/config/write.c
@@ -670,6 +670,16 @@ void test_config_write__locking(void)
git_transaction_free(tx);
/* Now that we've unlocked it, we should see both updates */
+ cl_git_pass(git_config_get_entry(&entry, cfg, "section.name"));
+ cl_assert_equal_s("other value", entry->value);
+ git_config_entry_free(entry);
+ cl_git_pass(git_config_get_entry(&entry, cfg, "section2.name3"));
+ cl_assert_equal_s("more value", entry->value);
+ git_config_entry_free(entry);
+
+ git_config_free(cfg);
+
+ /* We should also see the changes after reopening the config */
cl_git_pass(git_config_open_ondisk(&cfg, filename));
cl_git_pass(git_config_get_entry(&entry, cfg, "section.name"));
cl_assert_equal_s("other value", entry->value);