ui-log: fix double counting
This crept in while rebasing the previous commit onto an updated upstream. Signed-off-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
parent
30304d8156
commit
da1d4c7776
4
ui-log.c
4
ui-log.c
@ -476,7 +476,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
|
|||||||
if (ofs<0)
|
if (ofs<0)
|
||||||
ofs = 0;
|
ofs = 0;
|
||||||
|
|
||||||
for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) {
|
for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) {
|
||||||
if (show_commit(commit, &rev))
|
if (show_commit(commit, &rev))
|
||||||
i++;
|
i++;
|
||||||
free_commit_buffer(commit);
|
free_commit_buffer(commit);
|
||||||
@ -484,7 +484,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
|
|||||||
commit->parents = NULL;
|
commit->parents = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; i++) {
|
for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; /* nop */) {
|
||||||
/*
|
/*
|
||||||
* In "follow" mode, we must count the files and lines the
|
* In "follow" mode, we must count the files and lines the
|
||||||
* first time we invoke diff on a given commit, and we need
|
* first time we invoke diff on a given commit, and we need
|
||||||
|
Loading…
Reference in New Issue
Block a user