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:
parent
3bab5d5625
commit
e3f53ce5bd
@ -357,9 +357,6 @@ static void walken_commit_walk(struct rev_info *rev)
|
|||||||
...
|
...
|
||||||
|
|
||||||
while ((commit = get_revision(rev))) {
|
while ((commit = get_revision(rev))) {
|
||||||
if (!commit)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
strbuf_reset(&prettybuf);
|
strbuf_reset(&prettybuf);
|
||||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, &prettybuf);
|
pp_commit_easy(CMIT_FMT_ONELINE, commit, &prettybuf);
|
||||||
puts(prettybuf.buf);
|
puts(prettybuf.buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user