git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git mergetool: create temporary files in different sub-folders but with same filenames

From
Stefan Beller <sbeller@google.com>
Date
Jun 2, 2015, 18:57 UTC
Message-ID
<CAGZ79kbiOe1Krs1Kxb_eKLF9gn830sSVArMp8oXcnHRPQngkvQ@mail.gmail.com>
In-Reply-To
<556DFA79.9020904@anbos.de>
On Tue, Jun 2, 2015 at 11:48 AM, Andre Bossert <anb0s@anbos.de> wrote:
Show 37 quoted lines
> 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. :)

Show 9 quoted lines
>
> --
> 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
Previous: Andre Bossert
Message 2 of 2 in “git mergetool: create temporary files in different sub-folders but with same filenames”
  1. Andre BossertJun 2, 2015
  2. Stefan BellerJun 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.