From: Marco Costalba Date: Sat, 29 Sep 2007 13:06:16 GMT Subject: Re: [PATCH 1/1] --color and --no-color git-log options don't need diffs to be computed. Message-ID: In-Reply-To: <20070929125633.GC32142@artemis.corp> On 9/29/07, Pierre Habouzit wrote: > > > > > Signed-off-by: Pierre Habouzit > > > > > - 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. > Perhaps also with an 'if' before to avoid clearing an already set revs->diff if the passed option does not match any of the three. Marco