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

Re: [PATCH] make inline is_null_sha1 global

From
Jonas Fonseca <fonseca@diku.dk>
Date
Aug 15, 2006, 21:58 UTC
Message-ID
<20060815215812.GB15797@diku.dk>
In-Reply-To
<Pine.LNX.4.63.0608151335020.1475@chino.corp.google.com>
David Rientjes <rientjes@google.com> wrote Tue, Aug 15, 2006:
Show 14 quoted lines
> diff --git a/builtin-diff.c b/builtin-diff.c
> index 82afce7..9003d55 100644
> --- a/builtin-diff.c
> +++ b/builtin-diff.c
> @@ -68,8 +68,7 @@ static void stuff_change(struct diff_opt
>  {
>  	struct diff_filespec *one, *two;
>  
> -	if (memcmp(null_sha1, old_sha1, 20) &&
> -	    memcmp(null_sha1, new_sha1, 20) &&
> +	if (is_null_sha1(old_sha1) && is_null_sha1(new_sha1) &&
>  	    !memcmp(old_sha1, new_sha1, 20))
>  		return;
>  
Looks like this should be !is_null_sha1(...) in both cases.
-- 
Jonas Fonseca
Previous: David RientjesNext: David Rientjes
Message 2 of 5 in “make inline is_null_sha1 global”
  1. make inline is_null_sha1 globalDavid Rientjes, Aug 15, 2006
  2. Jonas FonsecaAug 15, 2006
  3. David RientjesAug 15, 2006
  4. Jonas FonsecaAug 15, 2006
  5. Junio C HamanoAug 16, 2006

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.