diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-06-04 17:31:42 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-06-04 17:31:42 +0200 |
commit | 57cb1179e5c9c8f5c27c9115f13f1cae5d0f87a0 (patch) | |
tree | 67871086b1437dcd410979b423cd3ba140ab9257 /tests/online/fetchhead.c | |
parent | 90befde4a1938641dfdb9a7bdb9f361d1de5c26f (diff) | |
download | libgit2-cmn/config-default-snapshot.tar.gz |
Make the default repository config getter return a snapshotcmn/config-default-snapshot
You should always use a snapshot, with the sole exception of writing to
the configuration.
Any reads that are not against a snapshot have race conditions, both in
terms of returned values as well as dangling pointers.
Diffstat (limited to 'tests/online/fetchhead.c')
-rw-r--r-- | tests/online/fetchhead.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/online/fetchhead.c b/tests/online/fetchhead.c index 0b3f20db1..c601815b1 100644 --- a/tests/online/fetchhead.c +++ b/tests/online/fetchhead.c @@ -82,7 +82,7 @@ void test_online_fetchhead__no_merges(void) fetchhead_test_clone(); - cl_git_pass(git_repository_config(&config, g_repo)); + cl_git_pass(git_repository_config_writable(&config, g_repo)); cl_git_pass(git_config_delete_entry(config, "branch.master.remote")); cl_git_pass(git_config_delete_entry(config, "branch.master.merge")); git_config_free(config); |