mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-06 00:48:52 +00:00
Fix post-line-range iteration
This commit is contained in:
parent
c1ca2b67e1
commit
607fe73370
@ -29,7 +29,7 @@ static void usage(const char *msg, const char *arg)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i, line;
|
||||
int i, line, break_on_null_hunk;
|
||||
const char *path = NULL, *a;
|
||||
const char *rawdata, *commitspec=NULL, *bare_args[3] = {0};
|
||||
char spec[1024] = {0};
|
||||
@ -125,12 +125,16 @@ int main(int argc, char *argv[])
|
||||
/* Produce the output */
|
||||
line = 1;
|
||||
i = 0;
|
||||
break_on_null_hunk = 0;
|
||||
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);
|
||||
|
||||
if (break_on_null_hunk && !hunk) break;
|
||||
|
||||
if (hunk) {
|
||||
break_on_null_hunk = 1;
|
||||
char sig[128] = {0};
|
||||
|
||||
git_oid_tostr(oid, 10, &hunk->final_commit_id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user