From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: [PATCH] Be verbose when !initial commit Date: Mon, 20 Mar 2006 22:11:12 +0900 Message-ID: <87y7z58dn3.wl@mail2.atmark-techno.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-From: git-owner@vger.kernel.org Mon Mar 20 14:11:50 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FLKAf-00038Z-AX for gcvg-git@gmane.org; Mon, 20 Mar 2006 14:11:41 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751123AbWCTNLh (ORCPT ); Mon, 20 Mar 2006 08:11:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751124AbWCTNLh (ORCPT ); Mon, 20 Mar 2006 08:11:37 -0500 Received: from shop.atmark-techno.com ([210.191.215.173]:19115 "EHLO mail2.atmark-techno.com") by vger.kernel.org with ESMTP id S1751123AbWCTNLg (ORCPT ); Mon, 20 Mar 2006 08:11:36 -0500 Received: from smtp.local-network (dns1.atmark-techno.com [210.191.215.170]) by mail2.atmark-techno.com (Postfix) with ESMTP id AA4434477; Mon, 20 Mar 2006 22:11:18 +0900 (JST) Received: from localhost.atmark-techno.com (unknown [192.168.10.81]) by smtp.local-network (Postfix) with ESMTP id 164ACB61F; Mon, 20 Mar 2006 22:16:02 +0900 (JST) To: git@vger.kernel.org User-Agent: Wanderlust/2.14.0 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: verbose option in git-commit.sh lead us to run git-diff-index, which needs a commit-ish we are making diff against. When we are commiting the fist set, we obviously don't have any commit-ish in the repo. So we just skip the git-diff-index run. It might be possible to produce diff against empty but do we need that? Signed-off-by: Yasushi SHOJI --- git-commit.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) e071afdc1c6e9ce6bbee14aa0652e7bb7043550c diff --git a/git-commit.sh b/git-commit.sh index 330a434..1e7c09e 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -161,7 +161,7 @@ run_status () { } ' - if test -n "$verbose" + if test -n "$verbose" -a -z "$IS_INITIAL" then git-diff-index --cached -M -p --diff-filter=MDTCRA $REFERENCE fi -- 1.2.4