From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: Re: diff: --quiet does not imply --exit-code if --diff-filter is present Date: Wed, 01 Jun 2011 18:41:48 +0900 Message-ID: <87pqmxkhwj.wl@dns1.atmark-techno.com> References: <87wrh7jgzk.wl@dns1.atmark-techno.com> <20110531153356.GB2594@sigill.intra.peff.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Junio C Hamano , git@vger.kernel.org To: Jeff King X-From: git-owner@vger.kernel.org Wed Jun 01 11:42:29 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QRhwZ-0007lz-RH for gcvg-git-2@lo.gmane.org; Wed, 01 Jun 2011 11:42:28 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161213Ab1FAJlw (ORCPT ); Wed, 1 Jun 2011 05:41:52 -0400 Received: from p654782.hkidff01.ap.so-net.ne.jp ([121.101.71.130]:56280 "EHLO dns1.atmark-techno.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161198Ab1FAJlu (ORCPT ); Wed, 1 Jun 2011 05:41:50 -0400 Received: from sv-prius.atmark-techno.com (sv-prius.local-network [192.168.10.102]) by dns1.atmark-techno.com (Postfix) with ESMTP id 7FB876B9E9; Wed, 1 Jun 2011 18:41:48 +0900 (JST) Received: from wat.atmark-techno.com (unknown [172.16.10.1]) by sv-prius.atmark-techno.com (Postfix) with ESMTP id 0D57D5FC5A; Wed, 1 Jun 2011 18:41:48 +0900 (JST) In-Reply-To: <20110531153356.GB2594@sigill.intra.peff.net> User-Agent: Wanderlust/2.14.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi Jeff, At Tue, 31 May 2011 11:33:56 -0400, Jeff King wrote: > > On Tue, May 31, 2011 at 07:34:39PM +0900, Yasushi SHOJI wrote: > > > just noticed that quiet does not return exit code when I set > > diff-filter. at the current tip (v1.7.5.3-401-gfb674d7): > > > > git diff --quiet --diff-filter=A v1.7.5 v1.7.5.1 -- t #=> 0 > > git diff --exit-code --diff-filter=A v1.7.5 v1.7.5.1 -- t #=> 1 > > > > these two line returns different exit code. > > > > is this a bug or a feature? > > It's a bug. your patch works like a charm. Thanks. > Commit 2cfe8a6 (diff --quiet: disable optimization when > --diff-filter=X is used, 2011-03-16) fixes this in some > cases by disabling the optimization when a filter is > present. However, it only tweaked run_diff_files, missing > the similar case in diff_tree. Thus the fix worked only for > diffing the working tree and index, but not between trees. oh, sorry about not realizing the commit 2cfe8a6. regards, -- yashi