diff options
author | Vicent Martà <vicent@github.com> | 2013-03-01 14:28:47 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-03-01 14:28:47 -0800 |
commit | 01be786319238fd6507a08316d1c265c1a89407f (patch) | |
tree | 15680b3ede486d56a149625f2d3d7245c7293c00 /tests-clar/diff/patch.c | |
parent | 47f70846aae7605297c943282ac19af2e2c8c206 (diff) | |
parent | 487fc724ffa0d0260fc4c2a3ab0ea0d5d2ebe81d (diff) | |
download | libgit2-01be786319238fd6507a08316d1c265c1a89407f.tar.gz |
Merge pull request #1382 from arrbee/fix-diff-patch-a-different-way
Allow empty config object and use it for tests
Diffstat (limited to 'tests-clar/diff/patch.c')
-rw-r--r-- | tests-clar/diff/patch.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests-clar/diff/patch.c b/tests-clar/diff/patch.c index 353f3cc1a..77da37db6 100644 --- a/tests-clar/diff/patch.c +++ b/tests-clar/diff/patch.c @@ -150,9 +150,8 @@ void test_diff_patch__hunks_have_correct_line_numbers(void) g_repo = cl_git_sandbox_init("renames"); - cl_git_pass(git_repository_config(&cfg, g_repo)); - cl_git_pass(git_config_set_bool(cfg, "core.autocrlf", false)); - git_config_free(cfg); + cl_git_pass(git_config_new(&cfg)); + git_repository_set_config(g_repo, cfg); cl_git_rewritefile("renames/songof7cities.txt", new_content); @@ -278,9 +277,8 @@ void test_diff_patch__line_counts_with_eofnl(void) g_repo = cl_git_sandbox_init("renames"); - cl_git_pass(git_repository_config(&cfg, g_repo)); - cl_git_pass(git_config_set_bool(cfg, "core.autocrlf", false)); - git_config_free(cfg); + cl_git_pass(git_config_new(&cfg)); + git_repository_set_config(g_repo, cfg); cl_git_pass(git_futils_readbuffer(&content, "renames/songof7cities.txt")); |