diff options
author | Ben Straub <bs@github.com> | 2013-09-17 03:20:38 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-09-17 03:23:50 +0400 |
commit | ceab4e260637dc8374d0348ee9a078ab1c16e4ad (patch) | |
tree | 25124d6ea0528f5f3355046f56aaac43ba78ec4d /src/blame.h | |
parent | 549931679a77b280eb1f36afeda8930eb31d70f7 (diff) |
Port blame from git.git
Diffstat (limited to 'src/blame.h')
-rw-r--r-- | src/blame.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/blame.h b/src/blame.h new file mode 100644 index 000000000..260d5b5a1 --- /dev/null +++ b/src/blame.h @@ -0,0 +1,37 @@ +#ifndef INCLUDE_blame_h__ +#define INCLUDE_blame_h__ + +#include "git2/blame.h" +#include "common.h" +#include "vector.h" +#include "diff.h" +#include "array.h" +#include "git2/oid.h" + +struct git_blame { + const char *path; + git_repository *repository; + git_blame_options options; + + git_vector hunks; + git_vector unclaimed_hunks; + git_vector paths; + + git_blob *final_blob; + size_t num_lines; + + git_oid current_commit; + git_oid parent_commit; + size_t current_diff_line; + size_t current_blame_line; + git_blame_hunk *current_hunk; +}; + +git_blame *git_blame__alloc( + git_repository *repo, + git_blame_options opts, + const char *path); + +git_blame_hunk *git_blame__alloc_hunk(); + +#endif |