All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yasushi SHOJI <yashi@atmark-techno.com>
To: git@vger.kernel.org
Subject: [PATCH] Be verbose when !initial commit
Date: Mon, 20 Mar 2006 22:11:12 +0900	[thread overview]
Message-ID: <87y7z58dn3.wl@mail2.atmark-techno.com> (raw)

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 <yashi@atmark-techno.com>


---

 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

                 reply	other threads:[~2006-03-20 13:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y7z58dn3.wl@mail2.atmark-techno.com \
    --to=yashi@atmark-techno.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.