Commit 3b6288af by Tim

Removing redundant call to find start line.

parent 3b750a88
...@@ -117,15 +117,12 @@ static git_blame_hunk *dup_hunk(git_blame_hunk *hunk, git_blame *blame) ...@@ -117,15 +117,12 @@ 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;
for (i = 0; i < v->length; i++) {
if (!git_vector_bsearch2(&i, v, hunk_byfinalline_search_cmp, &start_line)) { git_blame_hunk *hunk = (git_blame_hunk*)v->contents[i];
for (i = 0; i < v->length; i++) { if(hunk->final_start_line_number < start_line){
git_blame_hunk *hunk = (git_blame_hunk*)v->contents[i]; continue;
if(hunk->final_start_line_number < start_line){
continue;
}
hunk->final_start_line_number += shift_by;
} }
hunk->final_start_line_number += shift_by;
} }
} }
......
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