diff options
| author | Ben Straub <bs@github.com> | 2013-09-20 15:38:15 -0700 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2013-09-20 15:38:15 -0700 |
| commit | ef03d040cf6cc81d71d340cf3915735724a77449 (patch) | |
| tree | f29b9842472d42283ed19b3dda67fbd36c331300 /src | |
| parent | a121e580113cb3206166b432ad8ebfd85c0c4d5f (diff) | |
| download | libgit2-ef03d040cf6cc81d71d340cf3915735724a77449.tar.gz | |
Trim fat from git_blame struct
Diffstat (limited to 'src')
| -rw-r--r-- | src/blame.c | 11 | ||||
| -rw-r--r-- | src/blame.h | 7 |
2 files changed, 0 insertions, 18 deletions
diff --git a/src/blame.c b/src/blame.c index 3b9d3db3b..e3460ba3b 100644 --- a/src/blame.c +++ b/src/blame.c @@ -62,11 +62,6 @@ static git_blame_hunk* new_hunk(uint16_t start, uint16_t lines, uint16_t orig_st return hunk; } -git_blame_hunk* git_blame__alloc_hunk() -{ - return new_hunk(0,0,0,NULL); -} - static git_blame_hunk* dup_hunk(git_blame_hunk *hunk) { git_blame_hunk *newhunk = new_hunk(hunk->final_start_line_number, hunk->lines_in_hunk, hunk->orig_start_line_number, hunk->orig_path); @@ -106,13 +101,11 @@ git_blame* git_blame__alloc( return NULL; } git_vector_init(&gbr->hunks, 8, hunk_sort_cmp_by_start_line); - git_vector_init(&gbr->unclaimed_hunks, 8, hunk_sort_cmp_by_start_line); git_vector_init(&gbr->paths, 8, paths_cmp); gbr->repository = repo; gbr->options = opts; gbr->path = git__strdup(path); git_vector_insert(&gbr->paths, git__strdup(path)); - gbr->final_blob = NULL; return gbr; } @@ -128,10 +121,6 @@ void git_blame_free(git_blame *blame) free_hunk(hunk); git_vector_free(&blame->hunks); - git_vector_foreach(&blame->unclaimed_hunks, i, hunk) - free_hunk(hunk); - git_vector_free(&blame->unclaimed_hunks); - git_vector_foreach(&blame->paths, i, path) git__free(path); git_vector_free(&blame->paths); diff --git a/src/blame.h b/src/blame.h index 260d5b5a1..1b107320b 100644 --- a/src/blame.h +++ b/src/blame.h @@ -14,16 +14,11 @@ struct git_blame { 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; }; @@ -32,6 +27,4 @@ git_blame *git_blame__alloc( git_blame_options opts, const char *path); -git_blame_hunk *git_blame__alloc_hunk(); - #endif |
