1 #ifndef INCLUDE_blame_h__
2 #define INCLUDE_blame_h__
6 #include "git2/blame.h"
13 * One blob in a commit that is being suspected
15 typedef struct git_blame__origin
{
17 struct git_blame__origin
*previous
;
20 char path
[GIT_FLEX_ARRAY
];
24 * Each group of lines is described by a git_blame__entry; it can be split
25 * as we pass blame to the parents. They form a linked list in the
26 * scoreboard structure, sorted by the target line number.
28 typedef struct git_blame__entry
{
29 struct git_blame__entry
*prev
;
30 struct git_blame__entry
*next
;
32 /* the first line of this group in the final image;
33 * internally all line numbers are 0 based.
37 /* how many lines this group has */
40 /* the commit that introduced this group into the final image */
41 git_blame__origin
*suspect
;
43 /* true if the suspect is truly guilty; false while we have not
44 * checked if the group came from one of its parents.
48 /* true if the entry has been scanned for copies in the current parent
52 /* the line number of the first line of this group in the
53 * suspect's file; internally all line numbers are 0 based.
57 /* how significant this entry is -- cached to avoid
58 * scanning the lines over and over.
62 /* Whether this entry has been tracked to a boundary commit.
69 git_repository
*repository
;
71 git_blame_options options
;
77 git_array_t(size_t) line_index
;
79 size_t current_diff_line
;
80 git_blame_hunk
*current_hunk
;
82 /* Scoreboard fields */
84 git_blame__entry
*ent
;
86 const char *final_buf
;
87 size_t final_buf_size
;
90 git_blame
*git_blame__alloc(
92 git_blame_options opts
,