summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-11-12 15:24:59 -0800
committerBen Straub <bs@github.com>2013-11-12 15:24:59 -0800
commit089297b2cd4f50a2218130f9f3a0ddceb86b8697 (patch)
treeb26c5dd145c5334c9694439654716f746b1e3d60 /src
parentf6f7537cfd8041d407a4f3b6c350b012975be116 (diff)
downloadlibgit2-089297b2cd4f50a2218130f9f3a0ddceb86b8697.tar.gz
Duplicate all fields of a blame hunk
Diffstat (limited to 'src')
-rw-r--r--src/blame.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/blame.c b/src/blame.c
index 01d3fc03c..b562b5b98 100644
--- a/src/blame.c
+++ b/src/blame.c
@@ -75,6 +75,11 @@ static git_blame_hunk* dup_hunk(git_blame_hunk *hunk)
hunk->orig_path);
git_oid_cpy(&newhunk->orig_commit_id, &hunk->orig_commit_id);
git_oid_cpy(&newhunk->final_commit_id, &hunk->final_commit_id);
+ newhunk->boundary = hunk->boundary;
+ if (hunk->final_signature)
+ newhunk->final_signature = git_signature_dup(hunk->final_signature);
+ if (hunk->orig_signature)
+ newhunk->orig_signature = git_signature_dup(hunk->orig_signature);
return newhunk;
}