git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] MyFirstObjectWalk: remove unnecessary conditional statement

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 30, 2020, 18:26 UTC
Message-ID
<xmqq5zel8zsx.fsf@gitster.c.googlers.com>
In-Reply-To
<20200330180742.GB37946@google.com>
Emily Shaffer <emilyshaffer@google.com> writes:
Show 16 quoted lines
> On Sat, Mar 28, 2020 at 03:19:13PM +0000, Johannes Schindelin via GitGitGadget wrote:
>> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>> 
>> 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.
>
> Nice catch. Thanks.
>
>> 
>> 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>
Thanks, both.
Previous: Emily Shaffer
Message 3 of 3 in “MyFirstObjectWalk: remove unnecessary conditional statement”
  1. MyFirstObjectWalk: remove unnecessary conditional statementJohannes Schindelin via GitGitGadget, Mar 28, 2020
  2. Emily ShafferMar 30, 2020
  3. Junio C HamanoMar 30, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.