Skip to contentSkip to conversation

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

PATCH In review Sebastian Schuberth 3 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mergetool: Make ECMerge use the settings as specified by the user in the GUI

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.

---
 git-mergetool.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
git-mergetool.sh +2 -2
index 5c86f69..fcdec4a 100755
@@ -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
 	    ;;
Signature · 1 line
1.5.5.GIT
#1 lore raw
Quoted 5 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.

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.

Signature · 1 line
Sebastian Schuberth
#2 lore raw
In reply to Sebastian Schuberth
Quoted 7 lines · Sebastian Schuberth

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

#3 lore raw
Quoted 16 lines · Steffen Prohaska
Quoted 5 lines · Sebastian Schuberth

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

Quoted 8 lines

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.

Quoted 3 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.

Queued.

#4 lore raw
Quoted 5 lines · Junio C Hamano
Quoted 3 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