diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/blame/harder.c | 8 | ||||
| -rw-r--r-- | tests/merge/merge_helpers.c | 1 | ||||
| -rw-r--r-- | tests/merge/trees/commits.c | 22 | ||||
| -rw-r--r-- | tests/refs/branches/create.c | 3 |
4 files changed, 10 insertions, 24 deletions
diff --git a/tests/blame/harder.c b/tests/blame/harder.c index 7c4dd4f74..e77741720 100644 --- a/tests/blame/harder.c +++ b/tests/blame/harder.c @@ -36,6 +36,8 @@ void test_blame_harder__m(void) /* TODO */ git_blame_options opts = GIT_BLAME_OPTIONS_INIT; + GIT_UNUSED(opts); + opts.flags = GIT_BLAME_TRACK_COPIES_SAME_FILE; } @@ -44,6 +46,8 @@ void test_blame_harder__c(void) { git_blame_options opts = GIT_BLAME_OPTIONS_INIT; + GIT_UNUSED(opts); + /* Attribute the first hunk in b.txt to (E), since it was cut/pasted from * a.txt in (D). */ @@ -54,6 +58,8 @@ void test_blame_harder__cc(void) { git_blame_options opts = GIT_BLAME_OPTIONS_INIT; + GIT_UNUSED(opts); + /* Attribute the second hunk in b.txt to (E), since it was copy/pasted from * a.txt in (C). */ @@ -63,6 +69,8 @@ void test_blame_harder__cc(void) void test_blame_harder__ccc(void) { git_blame_options opts = GIT_BLAME_OPTIONS_INIT; + + GIT_UNUSED(opts); /* Attribute the third hunk in b.txt to (E). This hunk was deleted from * a.txt in (D), but reintroduced in (B). diff --git a/tests/merge/merge_helpers.c b/tests/merge/merge_helpers.c index 7ca1e6522..5660179a7 100644 --- a/tests/merge/merge_helpers.c +++ b/tests/merge/merge_helpers.c @@ -60,7 +60,6 @@ int merge_commits_from_branches( git_commit *our_commit, *their_commit; git_oid our_oid, their_oid; git_buf branch_buf = GIT_BUF_INIT; - int error; git_buf_printf(&branch_buf, "%s%s", GIT_REFS_HEADS_DIR, ours_name); cl_git_pass(git_reference_name_to_id(&our_oid, repo, branch_buf.ptr)); diff --git a/tests/merge/trees/commits.c b/tests/merge/trees/commits.c index 92680c3c7..f8f4fbacb 100644 --- a/tests/merge/trees/commits.c +++ b/tests/merge/trees/commits.c @@ -29,28 +29,6 @@ void test_merge_trees_commits__cleanup(void) cl_git_sandbox_cleanup(); } -static void merge_commits( - git_index **out, - git_repository *repo, - const char *our_oidstr, - const char *their_oidstr, - const git_merge_tree_opts *opts) -{ - git_oid our_oid, their_oid; - git_commit *our_commit, *their_commit; - - cl_git_pass(git_oid_fromstr(&our_oid, our_oidstr)); - cl_git_pass(git_oid_fromstr(&their_oid, their_oidstr)); - - cl_git_pass(git_commit_lookup(&our_commit, repo, &our_oid)); - cl_git_pass(git_commit_lookup(&their_commit, repo, &their_oid)); - - cl_git_pass(git_merge_commits(out, repo, our_commit, their_commit, opts)); - - git_commit_free(our_commit); - git_commit_free(their_commit); -} - void test_merge_trees_commits__automerge(void) { git_index *index; diff --git a/tests/refs/branches/create.c b/tests/refs/branches/create.c index 693a592a3..e4ad6683e 100644 --- a/tests/refs/branches/create.c +++ b/tests/refs/branches/create.c @@ -73,4 +73,5 @@ void test_refs_branches_create__creating_a_branch_with_an_invalid_name_returns_E cl_assert_equal_i(GIT_EINVALIDSPEC, git_branch_create(&branch, repo, "inv@{id", target, 0)); -}
\ No newline at end of file +} + |
