mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 11:19:47 +00:00
commit
426d8456ea
@ -269,7 +269,9 @@ static git_blame_hunk* hunk_from_entry(git_blame__entry *e)
|
|||||||
git_blame_hunk *h = new_hunk(
|
git_blame_hunk *h = new_hunk(
|
||||||
e->lno+1, e->num_lines, e->s_lno+1, e->suspect->path);
|
e->lno+1, e->num_lines, e->s_lno+1, e->suspect->path);
|
||||||
git_oid_cpy(&h->final_commit_id, git_commit_id(e->suspect->commit));
|
git_oid_cpy(&h->final_commit_id, git_commit_id(e->suspect->commit));
|
||||||
|
git_oid_cpy(&h->orig_commit_id, git_commit_id(e->suspect->commit));
|
||||||
h->final_signature = git_signature_dup(git_commit_author(e->suspect->commit));
|
h->final_signature = git_signature_dup(git_commit_author(e->suspect->commit));
|
||||||
|
h->orig_signature = git_signature_dup(git_commit_author(e->suspect->commit));
|
||||||
h->boundary = e->is_boundary ? 1 : 0;
|
h->boundary = e->is_boundary ? 1 : 0;
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,9 @@ void check_blame_hunk_index(git_repository *repo, git_blame *blame, int idx,
|
|||||||
actual, expected);
|
actual, expected);
|
||||||
}
|
}
|
||||||
cl_assert_equal_s(actual, expected);
|
cl_assert_equal_s(actual, expected);
|
||||||
|
cl_assert_equal_i(git_oid_cmp(&hunk->final_commit_id, &hunk->orig_commit_id), 0);
|
||||||
|
|
||||||
|
|
||||||
if (strcmp(hunk->orig_path, orig_path)) {
|
if (strcmp(hunk->orig_path, orig_path)) {
|
||||||
hunk_message(idx, hunk, "has mismatched original path (got '%s', expected '%s')\n",
|
hunk_message(idx, hunk, "has mismatched original path (got '%s', expected '%s')\n",
|
||||||
hunk->orig_path, orig_path);
|
hunk->orig_path, orig_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user