git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] mergetool: avoid misleading message "Resetting to default..."

From
Steffen Prohaska <prohaska@zib.de>
Date
Oct 18, 2007, 10:25 UTC
Message-ID
<11927031342272-git-send-email-prohaska@zib.de>
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
Previous: Steffen ProhaskaNext: Steffen Prohaska
Message 9 of 10 in “mergetool”
  1. 0/2 mergetoolSteffen Prohaska, Oct 17, 2007
  2. 1/2 mergetool: use path to mergetool in config var mergetool.<tool>.pathSteffen Prohaska, Oct 17, 2007
  3. 2/2 mergetool: add support for ECMergeSteffen Prohaska, Oct 17, 2007
  4. Shawn O. PearceOct 18, 2007
  5. Steffen ProhaskaOct 18, 2007
  6. 1/2 mergetool: use path to mergetool in config var mergetool.<tool>.pathSteffen Prohaska, Oct 18, 2007
  7. Shawn O. PearceOct 18, 2007
  8. Steffen ProhaskaOct 18, 2007
  9. mergetool: avoid misleading message "Resetting to default..."Steffen Prohaska, Oct 18, 2007
  10. Steffen ProhaskaOct 17, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.