# ferreroser...@gmail.com / 2014-10-07 07:17:23 -0700: > I typed the following on Git Bash: > > git config --system mergetool.<merge_tool_name>.cmd '"<merge_tool_path>" > -base "$BASE" -local "$LOCAL" -remote "$REMOTE" -merged "$MERGED"'
> git mergetool -t <merge_tool_name> <model_name>.mdl > This command properly launches the GUI of the merge tool, however it > indicates that provided file names are invalid. They are of the form: > <model_name>.mdl.<revision>.#.mdl, where <revision> is either LOCAL, REMOTE > or BASE and # is a number. > > The merge tool needs to open the model in MATLAB and MATLAB does not allow > opening models with '.' in their names. > Thus, do any of you know whether there is a way to configure Git so that > temporary models are of the form <model_name>_mdl_<revision>_#.mdl instead > of <model_name>.mdl.<revision>.#.mdl? > > Other temp file name should also be ok as long as the file does not > contains dots in the part that corresponds to the file name. what about wrapping the actual mergetool in a short shell script? you already have a sh(1) after all: % git config --system mergetool.simulink.cmd \ 'mywrapper "$BASE" "$LOCAL" "$REMOTE" "$MERGED"' % cat > mywrapper <<'EOF' set -eu s="${0##*/}" b="${1:?}" l="${2:?}" r="${3:?}" m="${4:?}" wc=$(mktemp -d "$TMPDIR/$s-XXXXX") trap "rm -rf '$wc'" INT TERM EXIT ln -s "$b" "$wc/base.mdl" ln -s "$l" "$wc/local.mdl" ln -s "$r" "$wc/remote.mdl" ln -s "$m" "$wc/merged.mdl" $tool \ -base "$wc/base.mdl" \ -local "$wc/local.mdl" \ -remote "$wc/remote.mdl" \ -merged "$wc/merged.mdl"' EOF depending on details of your mergetool's operation you may need to add `cp "$wc/merged.mdl" "$m"` at the end of the wrapper. -- roman -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.