1 #ifndef INCLUDE_blame_h__
2 #define INCLUDE_blame_h__
4 #include "git2/blame.h"
12 * One blob in a commit that is being suspected
14 typedef struct git_blame__origin
{
16 struct git_blame__origin
*previous
;
19 char path
[GIT_FLEX_ARRAY
];
23 * Each group of lines is described by a git_blame__entry; it can be split
24 * as we pass blame to the parents. They form a linked list in the
25 * scoreboard structure, sorted by the target line number.
27 typedef struct git_blame__entry
{
28 struct git_blame__entry
*prev
;
29 struct git_blame__entry
*next
;
31 /* the first line of this group in the final image;
32 * internally all line numbers are 0 based.
36 /* how many lines this group has */
39 /* the commit that introduced this group into the final image */
40 git_blame__origin
*suspect
;
42 /* true if the suspect is truly guilty; false while we have not
43 * checked if the group came from one of its parents.
47 /* true if the entry has been scanned for copies in the current parent
51 /* the line number of the first line of this group in the
52 * suspect's file; internally all line numbers are 0 based.
56 /* how significant this entry is -- cached to avoid
57 * scanning the lines over and over.
61 /* Whether this entry has been tracked to a boundary commit.
68 git_repository
*repository
;
69 git_blame_options options
;
75 git_array_t(size_t) line_index
;
77 size_t current_diff_line
;
78 git_blame_hunk
*current_hunk
;
80 /* Scoreboard fields */
82 git_blame__entry
*ent
;
84 const char *final_buf
;
85 git_off_t final_buf_size
;
88 git_blame
*git_blame__alloc(
90 git_blame_options opts
,