From: Andre Bossert <anb0s@anbos.de>
To: git@vger.kernel.org
Subject: git mergetool: create temporary files in different sub-folders but with same filenames
Date: Tue, 02 Jun 2015 20:48:25 +0200 [thread overview]
Message-ID: <556DFA79.9020904@anbos.de> (raw)
Hello,
we are moving from ClearCase to Git (MSYS 1.9.5 at Win7x64) and trying
to configure one special merge tool "DiffMerge" for IBM Rhapsody files.
So we've added our merge tool (script) to gitconfig. The merge script
calls the DiffMerge for some file-extensions (sbs, rpy etc.). It works
in general, but the different file names passed to DiffMerge (e.g.
<base-name>.LOCAL.xyz.<ext>, <base-name>.REMOTE.xyz.<ext>) are shown as
conflict --> user have to solve it manually.
I've found the new feature (mergetool.writeToTemp = true) in
"https://github.com/git/git/blob/master/git-mergetool.sh
<https://github.com/git/git/blob/master/git-mergetool.sh>" that creates
one temporary folder for all four files with different names. I've added
some handling for sub-folders.
Instead of:
BACKUP="./$MERGED.BACKUP.$ext"
LOCAL="./$MERGED.LOCAL.$ext"
REMOTE="./$MERGED.REMOTE.$ext"
BASE="./$MERGED.BASE.$ext"
i've added this definitions (and some other handling for creation etc.)
...
TEMP_BACKUP="$MERGETOOL_TMPDIR/BACKUP"
TEMP_LOCAL="$MERGETOOL_TMPDIR/LOCAL"
TEMP_REMOTE="$MERGETOOL_TMPDIR/REMOTE"
TEMP_BASE="$MERGETOOL_TMPDIR/BASE"
BACKUP="$TEMP_BACKUP/${BASE}$ext"
LOCAL="$TEMP_LOCAL/${BASE}$ext"
REMOTE="$TEMP_REMOTE/${BASE}$ext"
BASE="$TEMP_BASE/${BASE}$ext"
...
I've tested the script with normal merge-workflows and it worked. May i
request a review and integration in Git?
--
Regards
Andre (anb0s)
eMail: anb0s@anbos.de <mailto:anb0s@anbos.de>
next reply other threads:[~2015-06-02 18:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 18:48 Andre Bossert [this message]
2015-06-02 18:57 ` git mergetool: create temporary files in different sub-folders but with same filenames Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=556DFA79.9020904@anbos.de \
--to=anb0s@anbos.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox