git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Prohaska <prohaska@zib.de>
To: spearce@spearce.org
Cc: git@vger.kernel.org, Steffen Prohaska <prohaska@zib.de>
Subject: [PATCH] mergetool: avoid misleading message "Resetting to default..."
Date: Thu, 18 Oct 2007 12:25:34 +0200	[thread overview]
Message-ID: <11927031342272-git-send-email-prohaska@zib.de> (raw)
In-Reply-To: <4591BA15-EB6B-4058-A2D0-879556481E59@zib.de>

If no mergetool is configured in the configuration variable
merge.tool the resetting message should not be printed.

This is fixed. The message is only printed if a tool is configured
but the entry in merge.tool is invalid.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-mergetool.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index 94511f9..a68b403 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -334,7 +334,7 @@ init_merge_tool_path() {
 
 if test -z "$merge_tool"; then
     merge_tool=`git config merge.tool`
-    if ! valid_tool "$merge_tool"; then
+    if test -n "$merge_tool" && ! valid_tool "$merge_tool"; then
 	    echo >&2 "git config option merge.tool set to unknown tool: $merge_tool"
 	    echo >&2 "Resetting to default..."
 	    unset merge_tool
-- 
1.5.3.4.222.g2830

  reply	other threads:[~2007-10-18 10:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17 17:16 [PATCH 0/2 v3] mergetool Steffen Prohaska
2007-10-17 17:16 ` [PATCH 1/2 v3] mergetool: use path to mergetool in config var mergetool.<tool>.path Steffen Prohaska
2007-10-17 17:16   ` [PATCH 2/2 v3] mergetool: add support for ECMerge Steffen Prohaska
2007-10-18  5:27   ` [PATCH 1/2 v3] mergetool: use path to mergetool in config var mergetool.<tool>.path Shawn O. Pearce
2007-10-18  7:52     ` Steffen Prohaska
2007-10-18  7:53       ` [PATCH 1/2 v4] " Steffen Prohaska
2007-10-18  8:00       ` [PATCH 1/2 v3] " Shawn O. Pearce
2007-10-18  8:40         ` Steffen Prohaska
2007-10-18 10:25           ` Steffen Prohaska [this message]
2007-10-17 17:20 ` [PATCH 0/2 v3] mergetool Steffen Prohaska

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=11927031342272-git-send-email-prohaska@zib.de \
    --to=prohaska@zib.de \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).