MyFirstObjectWalk: remove unnecessary conditional statement

In the given example, `commit` cannot be `NULL` (because this is the
loop condition: if it was `NULL`, the loop body would not be entered at
all). It took this developer a moment or two to see that this is
therefore dead code.

Let's remove it, to avoid puzzling future readers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin 2020-03-28 15:19:13 +00:00 committed by Junio C Hamano
parent 3bab5d5625
commit e3f53ce5bd

View file

@ -357,9 +357,6 @@ static void walken_commit_walk(struct rev_info *rev)
...
while ((commit = get_revision(rev))) {
if (!commit)
continue;
strbuf_reset(&prettybuf);
pp_commit_easy(CMIT_FMT_ONELINE, commit, &prettybuf);
puts(prettybuf.buf);