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

Re: [PATCH 1/1] --color and --no-color git-log options don't need diffs to be computed.

From
Pierre Habouzit <madcoder@debian.org>
Date
Sep 29, 2007, 12:56 UTC
Message-ID
<20070929125633.GC32142@artemis.corp>
In-Reply-To
<85ve9t8wh7.fsf@lola.goethe.zz>
On Sat, Sep 29, 2007 at 12:52:36PM +0000, David Kastrup wrote:
Show 13 quoted lines
> Pierre Habouzit <madcoder@debian.org> writes:
> 
> > Signed-off-by: Pierre Habouzit <madcoder@debian.org>
> 
> > -				if (strcmp(argv[i], "-z"))
> > -					revs->diff = 1;
> > +				revs->diff = strcmp(argv[i], "-z")
> > +					&& strcmp(argv[i], "--color")
> > +					&& strcmp(argv[i], "--no-color");
> >  				i += opts - 1;
> >  				continue;
> 
> This can clear a previously set value of revs->diff.
  Good catch, that should be |= of course.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: David KastrupNext: Marco Costalba
Message 7 of 12 in “Big performance regression with --no-color option in git-log”
  1. Marco CostalbaSep 29, 2007
  2. Pierre HabouzitSep 29, 2007
  3. Pierre HabouzitSep 29, 2007
  4. Marco CostalbaSep 29, 2007
  5. 1/1 --color and --no-color git-log options don't need diffs to be computed.Pierre Habouzit, Sep 29, 2007
  6. David KastrupSep 29, 2007
  7. Pierre HabouzitSep 29, 2007
  8. Marco CostalbaSep 29, 2007
  9. Marco CostalbaSep 29, 2007
  10. Fix revision log diff setup, avoid unnecessary diff generationLinus Torvalds, Sep 29, 2007
  11. Junio C HamanoSep 29, 2007
  12. Junio C HamanoSep 29, 2007

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.