1 #include "clar_libgit2.h"
7 * The test repo has a history that looks like this:
19 static git_repository
*g_repo
= NULL
;
21 void test_blame_harder__initialize(void)
23 cl_git_pass(git_repository_open(&g_repo
, cl_fixture("blametest.git")));
26 void test_blame_harder__cleanup(void)
28 git_repository_free(g_repo
);
34 void test_blame_harder__m(void)
37 git_blame_options opts
= GIT_BLAME_OPTIONS_INIT
;
41 opts
.flags
= GIT_BLAME_TRACK_COPIES_SAME_FILE
;
45 void test_blame_harder__c(void)
47 git_blame_options opts
= GIT_BLAME_OPTIONS_INIT
;
51 /* Attribute the first hunk in b.txt to (E), since it was cut/pasted from
54 opts
.flags
= GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
;
57 void test_blame_harder__cc(void)
59 git_blame_options opts
= GIT_BLAME_OPTIONS_INIT
;
63 /* Attribute the second hunk in b.txt to (E), since it was copy/pasted from
66 opts
.flags
= GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
;
69 void test_blame_harder__ccc(void)
71 git_blame_options opts
= GIT_BLAME_OPTIONS_INIT
;
75 /* Attribute the third hunk in b.txt to (E). This hunk was deleted from
76 * a.txt in (D), but reintroduced in (B).
78 opts
.flags
= GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
;