{"thread":{"id":"39502","subject":"git mergetool: create temporary files in different sub-folders but with same filenames","startedAt":"2015-06-02T18:48:25Z","lastAt":"2015-06-02T18:57:01Z","messageCount":2,"participants":["Andre Bossert","Stefan Beller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"262764","messageId":"556DFA79.9020904@anbos.de","threadId":"39502","inReplyTo":null,"subject":"git mergetool: create temporary files in different sub-folders but with same filenames","fromName":"Andre Bossert","fromEmail":"anb0s@anbos.de","sentAt":"2015-06-02T18:48:25Z","receivedAt":"2015-06-02T18:48:25Z","isPatch":false,"sender":{"key":"anb0s@anbos.de","avatar":null},"body":"Hello,\n\nwe are moving from ClearCase to Git (MSYS 1.9.5 at Win7x64) and trying \nto configure one special merge tool \"DiffMerge\" for IBM Rhapsody files. \nSo we've added our merge tool (script) to gitconfig. The merge script \ncalls the DiffMerge for some file-extensions (sbs, rpy etc.). It works \nin general, but the different file names passed to DiffMerge (e.g. \n<base-name>.LOCAL.xyz.<ext>, <base-name>.REMOTE.xyz.<ext>) are shown as \nconflict  --> user have to solve it manually.\n\nI've found the new feature (mergetool.writeToTemp = true) in \n\"https://github.com/git/git/blob/master/git-mergetool.sh \n<https://github.com/git/git/blob/master/git-mergetool.sh>\" that creates \none temporary folder for all four files with different names. I've added \nsome handling for sub-folders.\n\nInstead of:\n     BACKUP=\"./$MERGED.BACKUP.$ext\"\n     LOCAL=\"./$MERGED.LOCAL.$ext\"\n     REMOTE=\"./$MERGED.REMOTE.$ext\"\n     BASE=\"./$MERGED.BASE.$ext\"\n\ni've added this definitions (and some other handling for creation etc.)\n...\n     TEMP_BACKUP=\"$MERGETOOL_TMPDIR/BACKUP\"\n     TEMP_LOCAL=\"$MERGETOOL_TMPDIR/LOCAL\"\n     TEMP_REMOTE=\"$MERGETOOL_TMPDIR/REMOTE\"\n     TEMP_BASE=\"$MERGETOOL_TMPDIR/BASE\"\n\n     BACKUP=\"$TEMP_BACKUP/${BASE}$ext\"\n     LOCAL=\"$TEMP_LOCAL/${BASE}$ext\"\n     REMOTE=\"$TEMP_REMOTE/${BASE}$ext\"\n     BASE=\"$TEMP_BASE/${BASE}$ext\"\n...\n\nI've tested the script with normal merge-workflows and it worked. May i \nrequest a review and integration in Git?\n\n-- \nRegards\nAndre (anb0s)\neMail: anb0s@anbos.de <mailto:anb0s@anbos.de>\n"},{"id":"262765","messageId":"CAGZ79kbiOe1Krs1Kxb_eKLF9gn830sSVArMp8oXcnHRPQngkvQ@mail.gmail.com","threadId":"39502","inReplyTo":"556DFA79.9020904@anbos.de","subject":"Re: git mergetool: create temporary files in different sub-folders but with same filenames","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-06-02T18:57:01Z","receivedAt":"2015-06-02T18:57:01Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Jun 2, 2015 at 11:48 AM, Andre Bossert <anb0s@anbos.de> wrote:\n> Hello,\n>\n> we are moving from ClearCase to Git (MSYS 1.9.5 at Win7x64) and trying to\n> configure one special merge tool \"DiffMerge\" for IBM Rhapsody files. So\n> we've added our merge tool (script) to gitconfig. The merge script calls the\n> DiffMerge for some file-extensions (sbs, rpy etc.). It works in general, but\n> the different file names passed to DiffMerge (e.g.\n> <base-name>.LOCAL.xyz.<ext>, <base-name>.REMOTE.xyz.<ext>) are shown as\n> conflict  --> user have to solve it manually.\n>\n> I've found the new feature (mergetool.writeToTemp = true) in\n> \"https://github.com/git/git/blob/master/git-mergetool.sh\n> <https://github.com/git/git/blob/master/git-mergetool.sh>\" that creates one\n> temporary folder for all four files with different names. I've added some\n> handling for sub-folders.\n>\n> Instead of:\n>     BACKUP=\"./$MERGED.BACKUP.$ext\"\n>     LOCAL=\"./$MERGED.LOCAL.$ext\"\n>     REMOTE=\"./$MERGED.REMOTE.$ext\"\n>     BASE=\"./$MERGED.BASE.$ext\"\n>\n> i've added this definitions (and some other handling for creation etc.)\n> ...\n>     TEMP_BACKUP=\"$MERGETOOL_TMPDIR/BACKUP\"\n>     TEMP_LOCAL=\"$MERGETOOL_TMPDIR/LOCAL\"\n>     TEMP_REMOTE=\"$MERGETOOL_TMPDIR/REMOTE\"\n>     TEMP_BASE=\"$MERGETOOL_TMPDIR/BASE\"\n>\n>     BACKUP=\"$TEMP_BACKUP/${BASE}$ext\"\n>     LOCAL=\"$TEMP_LOCAL/${BASE}$ext\"\n>     REMOTE=\"$TEMP_REMOTE/${BASE}$ext\"\n>     BASE=\"$TEMP_BASE/${BASE}$ext\"\n> ...\n>\n> I've tested the script with normal merge-workflows and it worked. May i\n> request a review and integration in Git?\n\nhttps://github.com/git/git/blob/master/Documentation/SubmittingPatches\nexplains how to get your change into Git.\n\nSo essentially you'd not write an email as this in prose, but rather as a patch.\nSo you'd make the change as above in your copy of git.git and commit it,\nthen format it with git format-patch and then send the result to this list. :)\n\n>\n> --\n> Regards\n> Andre (anb0s)\n> eMail: anb0s@anbos.de <mailto:anb0s@anbos.de>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}