all repos — cgit @ da1d4c77760ff6a0eb5cbfbaf6956930089d1963

a hyperfast web frontend for git written in c

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>
John Keeping john@keeping.me.uk
Wed, 12 Aug 2015 16:41:34 +0100
commit

da1d4c77760ff6a0eb5cbfbaf6956930089d1963

parent

30304d8156a72ffc95e45e1aa9407319b81bd253

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M ui-log.cui-log.c

@@ -476,7 +476,7 @@

if (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)) i++; free_commit_buffer(commit);

@@ -484,7 +484,7 @@ free_commit_list(commit->parents);

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 * first time we invoke diff on a given commit, and we need