summaryrefslogtreecommitdiff
path: root/tests-clar/diff/tree.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-03-22 14:52:29 -0700
committerRussell Belfer <rb@github.com>2013-03-25 14:03:16 -0700
commit1098cfaecae823ede02881f995f18aee2908b89f (patch)
tree22699f76e42c99732c72a453cf5e716588af1525 /tests-clar/diff/tree.c
parentb8acb775e25c76f07dac8855ad0a88b37f7b2f17 (diff)
downloadlibgit2-1098cfaecae823ede02881f995f18aee2908b89f.tar.gz
Test fixes and cleanup
This fixes some places where the new tests were leaving the test area in a bad state or were freeing data they should not free. It also removes code that is extraneous to the core issue and fixes an invalid SHA being looked up in one of the tests (which was failing, but for the wrong reason).
Diffstat (limited to 'tests-clar/diff/tree.c')
-rw-r--r--tests-clar/diff/tree.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests-clar/diff/tree.c b/tests-clar/diff/tree.c
index 06e649979..850feefde 100644
--- a/tests-clar/diff/tree.c
+++ b/tests-clar/diff/tree.c
@@ -434,13 +434,11 @@ void test_diff_tree__regular_blob_mode_changed_to_executable_file(void)
void test_diff_tree__issue_1397(void)
{
- // this test shows, that it is not needed
- git_config *cfg;
+ /* this test shows that it is not needed */
+
g_repo = cl_git_sandbox_init("issue_1397");
- cl_git_pass(git_repository_config(&cfg, g_repo));
- cl_git_pass(git_config_set_bool(cfg, "core.autocrlf", true));
- git_config_free(cfg);
+ cl_repo_set_bool(g_repo, "core.autocrlf", true);
cl_assert((a = resolve_commit_oid_to_tree(g_repo, "8a7ef04")) != NULL);
cl_assert((b = resolve_commit_oid_to_tree(g_repo, "7f483a7")) != NULL);