* git mergetool: create temporary files in different sub-folders but with same filenames
@ 2015-06-02 18:48 Andre Bossert
2015-06-02 18:57 ` Stefan Beller
0 siblings, 1 reply; 2+ messages in thread
From: Andre Bossert @ 2015-06-02 18:48 UTC (permalink / raw)
To: git
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git mergetool: create temporary files in different sub-folders but with same filenames
2015-06-02 18:48 git mergetool: create temporary files in different sub-folders but with same filenames Andre Bossert
@ 2015-06-02 18:57 ` Stefan Beller
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Beller @ 2015-06-02 18:57 UTC (permalink / raw)
To: Andre Bossert; +Cc: git@vger.kernel.org
On Tue, Jun 2, 2015 at 11:48 AM, Andre Bossert <anb0s@anbos.de> wrote:
> 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?
https://github.com/git/git/blob/master/Documentation/SubmittingPatches
explains how to get your change into Git.
So essentially you'd not write an email as this in prose, but rather as a patch.
So you'd make the change as above in your copy of git.git and commit it,
then format it with git format-patch and then send the result to this list. :)
>
> --
> Regards
> Andre (anb0s)
> eMail: anb0s@anbos.de <mailto:anb0s@anbos.de>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-02 18:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 18:48 git mergetool: create temporary files in different sub-folders but with same filenames Andre Bossert
2015-06-02 18:57 ` Stefan Beller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.