mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 17:05:49 +00:00
Only show lines that had blame run on them
This commit is contained in:
parent
d2e7532f62
commit
ebd67243d5
@ -128,10 +128,11 @@ int main(int argc, char *argv[])
|
||||
while (i < git_blob_rawsize(blob)) {
|
||||
const char *eol = strchr(rawdata+i, '\n');
|
||||
char oid[10] = {0};
|
||||
const git_blame_hunk *hunk = git_blame_get_hunk_byline(blame, line);
|
||||
git_commit *hunkcommit;
|
||||
const git_signature *sig;
|
||||
const git_blame_hunk *hunk = git_blame_get_hunk_byline(blame, line);
|
||||
|
||||
if (hunk) {
|
||||
git_oid_tostr(oid, 10, &hunk->final_commit_id);
|
||||
check(git_commit_lookup(&hunkcommit, repo, &hunk->final_commit_id), "Commit lookup error");
|
||||
sig = git_commit_author(hunkcommit);
|
||||
@ -142,8 +143,9 @@ int main(int argc, char *argv[])
|
||||
line,
|
||||
(int)(eol-rawdata-i),
|
||||
rawdata+i);
|
||||
|
||||
git_commit_free(hunkcommit);
|
||||
}
|
||||
|
||||
i = eol - rawdata + 1;
|
||||
line++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user