# [PATCH] mergetool: Make ECMerge use the settings as specified by the user in the GUI

5 messages from 2008-05-06 to 2008-05-11. Participants: Sebastian Schuberth, Steffen Prohaska, Junio C Hamano.
Thread: https://gitlist.dev/t/13392

## Sebastian Schuberth, 2008-05-06 10:53

Subject: [PATCH] mergetool: Make ECMerge use the settings as specified by the user in the GUI
Message-ID: <482038C4.6050402@visageimaging.com>
URL: https://gitlist.dev/e/482038C4.6050402%40visageimaging.com

```
When run from the command line, ECMerge does not automatically use the same
settings for a merge / diff that it would use when starting the GUI and loading
files manually. In the first case the built-in factory defaults would be used,
while in the second case the settings the user has specified in the GUI would
be used, which can be misleading. Specifying the "--default" command line
option changes this behavior so that always the user specfified GUI settings
are used.

Signed-off-by: Sebastian Schuberth <sschuberth@visageimaging.com>
---
 git-mergetool.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index 5c86f69..fcdec4a 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -237,9 +237,9 @@ merge_file () {
 	ecmerge)
 	    touch "$BACKUP"
 	    if base_present; then
-		"$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" --mode=merge3 --to="$MERGED"
+		"$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" --default --mode=merge3 --to="$MERGED"
 	    else
-		"$merge_tool_path" "$LOCAL" "$REMOTE" --mode=merge2 --to="$MERGED"
+		"$merge_tool_path" "$LOCAL" "$REMOTE" --default --mode=merge2 --to="$MERGED"
 	    fi
 	    check_unchanged
 	    ;;
-- 
1.5.5.GIT

```

## Sebastian Schuberth, 2008-05-06 12:06

Subject: Re: [PATCH] mergetool: Make ECMerge use the settings as specified by the user in the GUI
Message-ID: <fvphjn$im$1@ger.gmane.org>
URL: https://gitlist.dev/e/fvphjn%24im%241%40ger.gmane.org
In-Reply-To: <482038C4.6050402@visageimaging.com>

```
> be used, which can be misleading. Specifying the "--default" command line
> option changes this behavior so that always the user specfified GUI settings
> are used.
> 
> Signed-off-by: Sebastian Schuberth <sschuberth@visageimaging.com>

Sorry, I just saw the typo, of course this should say "[...] user specified GUI settings [...]". And the subject has two spaces between "[...] by  the [...]", which should be only one.

-- 
Sebastian Schuberth

```

## Steffen Prohaska, 2008-05-11 07:33

Subject: Re: [PATCH] mergetool: Make ECMerge use the settings as specified by the user in the GUI
Message-ID: <183DBDB1-99BE-42C5-91DE-2488046164B7@zib.de>
URL: https://gitlist.dev/e/183DBDB1-99BE-42C5-91DE-2488046164B7%40zib.de
In-Reply-To: <482038C4.6050402@visageimaging.com>

```

On May 6, 2008, at 12:53 PM, Sebastian Schuberth wrote:

> When run from the command line, ECMerge does not automatically use  
> the same
> settings for a merge / diff that it would use when starting the GUI  
> and loading
> files manually. In the first case the built-in factory defaults  
> would be used,
> while in the second case the settings the user has specified in the  
> GUI would
> be used, which can be misleading. Specifying the "--default" command  
> line
> option changes this behavior so that always the user specfified GUI  
> settings
> are used.


I tested the change and propose to take the patch.  I needed,
however, to remove dos line endings from the patch before it
applied cleanly.

	Steffen

```

## Junio C Hamano, 2008-05-11 17:31

Subject: Re: [PATCH] mergetool: Make ECMerge use the settings as specified by the user in the GUI
Message-ID: <7vy76g4uis.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vy76g4uis.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <183DBDB1-99BE-42C5-91DE-2488046164B7@zib.de>

```
Steffen Prohaska <prohaska@zib.de> writes:

> On May 6, 2008, at 12:53 PM, Sebastian Schuberth wrote:
>
>> When run from the command line, ECMerge does not automatically use
>> the same
>> settings for a merge / diff that it would use when starting the GUI
>> and loading
>> files manually. In the first case the built-in factory defaults
>> would be used,
>> while in the second case the settings the user has specified in the
>> GUI would
>> be used, which can be misleading. Specifying the "--default" command
>> line
>> option changes this behavior so that always the user specfified GUI
>> settings
>> are used.
>
> I tested the change and propose to take the patch.  I needed,
> however, to remove dos line endings from the patch before it
> applied cleanly.

Thanks, I did not have that "apply" problem.  

Queued.

```

## Steffen Prohaska, 2008-05-11 19:08

Subject: Re: [PATCH] mergetool: Make ECMerge use the settings as specified by the user in the GUI
Message-ID: <54B4FE81-30F2-4B4B-BE47-91661EF9745F@zib.de>
URL: https://gitlist.dev/e/54B4FE81-30F2-4B4B-BE47-91661EF9745F%40zib.de
In-Reply-To: <7vy76g4uis.fsf@gitster.siamese.dyndns.org>

```

On May 11, 2008, at 7:31 PM, Junio C Hamano wrote:

>> I tested the change and propose to take the patch.  I needed,
>> however, to remove dos line endings from the patch before it
>> applied cleanly.
>
> Thanks, I did not have that "apply" problem.

Indeed, it is Mac OS X's Mail.app that exports mails with the
wrong line endings.  I did not recognize this before, so I guess
something changed with OS X 10.5, which I installed recently.

	Steffen

```
