Commit 3b6288af by Tim

Removing redundant call to find start line.

parent 3b750a88
...@@ -117,8 +117,6 @@ static git_blame_hunk *dup_hunk(git_blame_hunk *hunk, git_blame *blame) ...@@ -117,8 +117,6 @@ static git_blame_hunk *dup_hunk(git_blame_hunk *hunk, git_blame *blame)
static void shift_hunks_by(git_vector *v, size_t start_line, int shift_by) static void shift_hunks_by(git_vector *v, size_t start_line, int shift_by)
{ {
size_t i; size_t i;
if (!git_vector_bsearch2(&i, v, hunk_byfinalline_search_cmp, &start_line)) {
for (i = 0; i < v->length; i++) { for (i = 0; i < v->length; i++) {
git_blame_hunk *hunk = (git_blame_hunk*)v->contents[i]; git_blame_hunk *hunk = (git_blame_hunk*)v->contents[i];
if(hunk->final_start_line_number < start_line){ if(hunk->final_start_line_number < start_line){
...@@ -126,7 +124,6 @@ static void shift_hunks_by(git_vector *v, size_t start_line, int shift_by) ...@@ -126,7 +124,6 @@ static void shift_hunks_by(git_vector *v, size_t start_line, int shift_by)
} }
hunk->final_start_line_number += shift_by; hunk->final_start_line_number += shift_by;
} }
}
} }
git_blame *git_blame__alloc( git_blame *git_blame__alloc(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment