threads / patch / 13392

patchmergetool: Make ECMerge use the settings as specified by the user in the GUI

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

## tl;dr

5 messages between May 6, 2008 and May 11, 2008. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Sebastian Schuberth· May 6, 2008, 10:53 UTC · lore

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(-)
Show changes to git-mergetool.sh +2 −2
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· May 6, 2008, 12:06 UTC · re: Sebastian Schuberth · lore

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

Show 5 quoted lines
> 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· May 11, 2008, 07:33 UTC · re: Sebastian Schuberth · lore

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

On May 6, 2008, at 12:53 PM, Sebastian Schuberth wrote:
Show 13 quoted lines
> 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· May 11, 2008, 17:31 UTC · re: Steffen Prohaska · lore

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

Steffen Prohaska <prohaska@zib.de> writes:
Show 19 quoted lines
> 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· May 11, 2008, 19:08 UTC · re: Junio C Hamano · lore

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

On May 11, 2008, at 7:31 PM, Junio C Hamano wrote:
Show 5 quoted lines
>> 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

← back to recent threads