{"thread":{"id":"31215","subject":"[PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows","startedAt":"2012-08-08T20:31:12Z","lastAt":"2012-08-10T08:21:06Z","messageCount":7,"participants":["Sebastian Schuberth","Junio C Hamano","David Aguilar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"196698","messageId":"5022CC90.3060108@gmail.com","threadId":"31215","inReplyTo":null,"subject":"[PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2012-08-08T20:31:12Z","receivedAt":"2012-08-08T20:31:12Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"Code Compare is a commercial file comparison tool for Windows, see\n\n    http://www.devart.com/codecompare/\n\nVersion 2.80.4 added support for command line arguments preceded by a\ndash instead of a slash. This is required for Git for Windows because\nslashes in command line arguments get mangled with according to these\nrules:\n\n    http://www.mingw.org/wiki/Posix_path_conversion\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n Documentation/merge-config.txt         |  8 ++++----\n contrib/completion/git-completion.bash |  2 +-\n git-mergetool--lib.sh                  |  2 +-\n mergetools/codecompare                 | 25 +++++++++++++++++++++++++\n 4 files changed, 31 insertions(+), 6 deletions(-)\n create mode 100644 mergetools/codecompare\n\ndiff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt\nindex 861bd6f..e9e0d55 100644\n--- a/Documentation/merge-config.txt\n+++ b/Documentation/merge-config.txt\n@@ -54,10 +54,10 @@ merge.stat::\n merge.tool::\n \tControls which merge resolution program is used by\n \tlinkgit:git-mergetool[1].  Valid built-in values are: \"araxis\",\n-\t\"bc3\", \"diffuse\", \"ecmerge\", \"emerge\", \"gvimdiff\", \"kdiff3\", \"meld\",\n-\t\"opendiff\", \"p4merge\", \"tkdiff\", \"tortoisemerge\", \"vimdiff\"\n-\tand \"xxdiff\".  Any other value is treated is custom merge tool\n-\tand there must be a corresponding mergetool.<tool>.cmd option.\n+\t\"bc3\", \"codecompare\", \"diffuse\", \"ecmerge\", \"emerge\", \"gvimdiff\",\n+\t\"kdiff3\", \"meld\", \"opendiff\", \"p4merge\", \"tkdiff\", \"tortoisemerge\",\n+\t\"vimdiff\" and \"xxdiff\".  Any other value is treated is custom merge\n+\ttool and there must be a corresponding mergetool.<tool>.cmd option.\n \n merge.verbosity::\n \tControls the amount of output shown by the recursive merge\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex ffedce7..222b804 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1071,7 +1071,7 @@ _git_diff ()\n }\n \n __git_mergetools_common=\"diffuse ecmerge emerge kdiff3 meld opendiff\n-\t\t\ttkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3\n+\t\t\ttkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare\n \"\n \n _git_difftool ()\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex f730253..54cb708 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -126,7 +126,7 @@ list_merge_tool_candidates () {\n \t\telse\n \t\t\ttools=\"opendiff kdiff3 tkdiff xxdiff meld $tools\"\n \t\tfi\n-\t\ttools=\"$tools gvimdiff diffuse ecmerge p4merge araxis bc3\"\n+\t\ttools=\"$tools gvimdiff diffuse ecmerge p4merge araxis bc3 codecompare\"\n \tfi\n \tcase \"${VISUAL:-$EDITOR}\" in\n \t*vim*)\ndiff --git a/mergetools/codecompare b/mergetools/codecompare\nnew file mode 100644\nindex 0000000..3f0486b\n--- /dev/null\n+++ b/mergetools/codecompare\n@@ -0,0 +1,25 @@\n+diff_cmd () {\n+\t\"$merge_tool_path\" \"$LOCAL\" \"$REMOTE\"\n+}\n+\n+merge_cmd () {\n+\ttouch \"$BACKUP\"\n+\tif $base_present\n+\tthen\n+\t\t\"$merge_tool_path\" -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" \\\n+\t\t\t-RF=\"$MERGED\"\n+\telse\n+\t\t\"$merge_tool_path\" -MF=\"$LOCAL\" -TF=\"$REMOTE\" \\\n+\t\t\t-RF=\"$MERGED\"\n+\tfi\n+\tcheck_unchanged\n+}\n+\n+translate_merge_tool_path() {\n+\tif merge_mode\n+\tthen\n+\t\techo CodeMerge\n+\telse\n+\t\techo CodeCompare\n+\tfi\n+}\n-- \n1.7.11.msysgit.3\n"},{"id":"196709","messageId":"7v1ujhrs7e.fsf@alter.siamese.dyndns.org","threadId":"31215","inReplyTo":"5022CC90.3060108@gmail.com","subject":"Re: [PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-08T21:26:13Z","receivedAt":"2012-08-08T21:26:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> Code Compare is a commercial file comparison tool for Windows, see\n>\n>     http://www.devart.com/codecompare/\n>\n> Version 2.80.4 added support for command line arguments preceded by a\n> dash instead of a slash. This is required for Git for Windows because\n> slashes in command line arguments get mangled with according to these\n> rules:\n>\n>     http://www.mingw.org/wiki/Posix_path_conversion\n>\n> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n> ---\n>  Documentation/merge-config.txt         |  8 ++++----\n>  contrib/completion/git-completion.bash |  2 +-\n>  git-mergetool--lib.sh                  |  2 +-\n>  mergetools/codecompare                 | 25 +++++++++++++++++++++++++\n>  4 files changed, 31 insertions(+), 6 deletions(-)\n>  create mode 100644 mergetools/codecompare\n>\n> diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt\n> index 861bd6f..e9e0d55 100644\n> --- a/Documentation/merge-config.txt\n> +++ b/Documentation/merge-config.txt\n> @@ -54,10 +54,10 @@ merge.stat::\n>  merge.tool::\n>  \tControls which merge resolution program is used by\n>  \tlinkgit:git-mergetool[1].  Valid built-in values are: \"araxis\",\n> -\t\"bc3\", \"diffuse\", \"ecmerge\", \"emerge\", \"gvimdiff\", \"kdiff3\", \"meld\",\n> -\t\"opendiff\", \"p4merge\", \"tkdiff\", \"tortoisemerge\", \"vimdiff\"\n> -\tand \"xxdiff\".  Any other value is treated is custom merge tool\n> -\tand there must be a corresponding mergetool.<tool>.cmd option.\n> +\t\"bc3\", \"codecompare\", \"diffuse\", \"ecmerge\", \"emerge\", \"gvimdiff\",\n> +\t\"kdiff3\", \"meld\", \"opendiff\", \"p4merge\", \"tkdiff\", \"tortoisemerge\",\n> +\t\"vimdiff\" and \"xxdiff\".  Any other value is treated is custom merge\n> +\ttool and there must be a corresponding mergetool.<tool>.cmd option.\n>  \n>  merge.verbosity::\n>  \tControls the amount of output shown by the recursive merge\n\nI do not have a strong reason to vote for or against inclusion of\nyet another tool as mergetool backends (read: Meh), but what this\npatch does to Documentation/merge-config.txt is actively unwelcome.\n\nAs we discussed earlier in\n\n    http://thread.gmane.org/gmane.comp.version-control.git/201913/focus=201976\n\nthe longer term direction is to reduce the names of tools listed\nthere.\n\nI am somewhat saddened to find your name in that thread; you should\nhave been aware of that discussion when you wrote this patch.\n"},{"id":"196727","messageId":"CAHGBnuOaze=opbK+hH2s92enHuN2NUuKOVsTY4ZKgc3aWsX2-g@mail.gmail.com","threadId":"31215","inReplyTo":"7v1ujhrs7e.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2012-08-09T07:06:51Z","receivedAt":"2012-08-09T07:06:51Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Wed, Aug 8, 2012 at 11:26 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n> I do not have a strong reason to vote for or against inclusion of\n> yet another tool as mergetool backends (read: Meh), but what this\n\nThat sounds almost as if you'd like to keep the number of directly\nsupported mergetools small (I'm not talking about about the length of\nthe list of mergetools in the docs right now). I was always thinking,\nthe more mergetools, the better. Do you think differently?\n\n> patch does to Documentation/merge-config.txt is actively unwelcome.\n>\n> As we discussed earlier in\n>\n>     http://thread.gmane.org/gmane.comp.version-control.git/201913/focus=201976\n>\n> the longer term direction is to reduce the names of tools listed\n> there.\n>\n> I am somewhat saddened to find your name in that thread; you should\n> have been aware of that discussion when you wrote this patch.\n\nI still agree that not listing all mergetools in multiple places is a\ngood thing. But doing the whole stuff of extending --tool-help for\ngit-mergetool and git-difftool to return a simple list that can be\nused in git-completion.bash etc. IMHO is a separate topic and out of\nscope of this patch.\n\nIf it helps to accept the patch, I can send a v2 that changes\nmerge-config.txt and diff-config.txt to refer to \"git-mergetool\n--tool-help\" and \"git-difftool --tool-help\" instead of naming any\nactual tools.\n\n-- \nSebastian Schuberth\n"},{"id":"196736","messageId":"7vipcsoxwa.fsf@alter.siamese.dyndns.org","threadId":"31215","inReplyTo":"CAHGBnuOaze=opbK+hH2s92enHuN2NUuKOVsTY4ZKgc3aWsX2-g@mail.gmail.com","subject":"Re: [PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-09T16:03:49Z","receivedAt":"2012-08-09T16:03:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> On Wed, Aug 8, 2012 at 11:26 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> I do not have a strong reason to vote for or against inclusion of\n>> yet another tool as mergetool backends (read: Meh), but what this\n>\n> That sounds almost as if you'd like to keep the number of directly\n> supported mergetools small (I'm not talking about about the length of\n> the list of mergetools in the docs right now). I was always thinking,\n> the more mergetools, the better. Do you think differently?\n\nIt depends on the pros-and-cons between the cost of forcing many\npeople to see a list of supported backends with yet one more item\n(the list only grows and rarely shrinks) and the benefit of the\nsubset of users who can now use it.  I couldn't measure how widely\nthe particular commercial program is used from your proposed commit\nlog message, and that is where my \"for or against\" comes from.\n\n>> patch does to Documentation/merge-config.txt is actively unwelcome.\n>>\n>> As we discussed earlier in\n>>\n>>     http://thread.gmane.org/gmane.comp.version-control.git/201913/focus=201976\n>>\n>> the longer term direction is to reduce the names of tools listed\n>> there.\n>>\n>> I am somewhat saddened to find your name in that thread; you should\n>> have been aware of that discussion when you wrote this patch.\n>\n> I still agree that not listing all mergetools in multiple places is a\n> good thing. But doing the whole stuff of extending --tool-help for\n> git-mergetool and git-difftool to return a simple list that can be\n> used in git-completion.bash etc. IMHO is a separate topic and out of\n> scope of this patch.\n\nExactly.  If you know that is the long term direction, I would have\npreferred you _not_ to touch any existing descriptions of the tools\n(not even changing them to refer to \"--tool-help\") in this patch, in\norder to avoid unnecessary conflicts with the topic of unifying the\nlist of tool backends, which can be written and cooked separately.\n\nThanks.\n"},{"id":"196739","messageId":"CAHGBnuPT+ULpPtO_QxqUY8qxfbRT==fACQdM+TG2CyhbcKM-_w@mail.gmail.com","threadId":"31215","inReplyTo":"7vipcsoxwa.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2012-08-09T16:22:17Z","receivedAt":"2012-08-09T16:22:17Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Thu, Aug 9, 2012 at 6:03 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>> I still agree that not listing all mergetools in multiple places is a\n>> good thing. But doing the whole stuff of extending --tool-help for\n>> git-mergetool and git-difftool to return a simple list that can be\n>> used in git-completion.bash etc. IMHO is a separate topic and out of\n>> scope of this patch.\n>\n> Exactly.  If you know that is the long term direction, I would have\n> preferred you _not_ to touch any existing descriptions of the tools\n> (not even changing them to refer to \"--tool-help\") in this patch, in\n> order to avoid unnecessary conflicts with the topic of unifying the\n> list of tool backends, which can be written and cooked separately.\n\nTo the the best of my knowledge there currently no such topic\nunderway, and even if it was, it would be unclear how long it would\ntake for integration. If I was not touching the existing descriptions\nof the tools, and a Git version was to be released after accepting my\npatch but before the --tool-help topic is merged, that would leave the\ndocumentation in a wrong state. I was just trying to be consistent by\nalso touching the descriptions, which IMHO is the correct thing to do\nin the short term, as you yourself say the topic to make use of\n--tool-help is a long term goal.\n\n-- \nSebastian Schuberth\n"},{"id":"196774","messageId":"CAJDDKr7uHXajcy-jLrg7PToh6cFH3wVYvuX8E7_tq+s2n+b+LA@mail.gmail.com","threadId":"31215","inReplyTo":"CAHGBnuPT+ULpPtO_QxqUY8qxfbRT==fACQdM+TG2CyhbcKM-_w@mail.gmail.com","subject":"Re: [PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2012-08-10T04:39:35Z","receivedAt":"2012-08-10T04:39:35Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Thu, Aug 9, 2012 at 9:22 AM, Sebastian Schuberth\n<sschuberth@gmail.com> wrote:\n> On Thu, Aug 9, 2012 at 6:03 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n>>> I still agree that not listing all mergetools in multiple places is a\n>>> good thing. But doing the whole stuff of extending --tool-help for\n>>> git-mergetool and git-difftool to return a simple list that can be\n>>> used in git-completion.bash etc. IMHO is a separate topic and out of\n>>> scope of this patch.\n>>\n>> Exactly.  If you know that is the long term direction, I would have\n>> preferred you _not_ to touch any existing descriptions of the tools\n>> (not even changing them to refer to \"--tool-help\") in this patch, in\n>> order to avoid unnecessary conflicts with the topic of unifying the\n>> list of tool backends, which can be written and cooked separately.\n>\n> To the the best of my knowledge there currently no such topic\n> underway, and even if it was, it would be unclear how long it would\n> take for integration. If I was not touching the existing descriptions\n> of the tools, and a Git version was to be released after accepting my\n> patch but before the --tool-help topic is merged, that would leave the\n> documentation in a wrong state. I was just trying to be consistent by\n> also touching the descriptions, which IMHO is the correct thing to do\n> in the short term, as you yourself say the topic to make use of\n> --tool-help is a long term goal.\n\nThanks Sebastian.\n\nI think your patch would be good, so long as we leave the descriptions alone.\n\nIf you could please re-roll to add the new scriptlet without touching\nthe docs then that would be very helpful.\n\nI have a separate patch to update the mergetool documentation\nfor --tool-help which I will send shortly.\n\nI have another topic (--symlinks) in next upon which it is based.\n-- \nDavid\n"},{"id":"196786","messageId":"5024C472.50505@gmail.com","threadId":"31215","inReplyTo":"CAJDDKr7uHXajcy-jLrg7PToh6cFH3wVYvuX8E7_tq+s2n+b+LA@mail.gmail.com","subject":"[PATCH v2] Add Code Compare v2.80.4 as a merge / diff tool for Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2012-08-10T08:21:06Z","receivedAt":"2012-08-10T08:21:06Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"Code Compare is a commercial file comparison tool for Windows, see\n\n    http://www.devart.com/codecompare/\n\nVersion 2.80.4 added support for command line arguments preceded by a\ndash instead of a slash. This is required for Git for Windows because\nslashes in command line arguments get mangled with according to these\nrules:\n\n    http://www.mingw.org/wiki/Posix_path_conversion\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n contrib/completion/git-completion.bash |    2 +-\n git-mergetool--lib.sh                  |    2 +-\n mergetools/codecompare                 |   25 +++++++++++++++++++++++++\n 3 files changed, 27 insertions(+), 2 deletions(-)\n create mode 100644 mergetools/codecompare\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex ffedce7..222b804 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1071,7 +1071,7 @@ _git_diff ()\n }\n \n __git_mergetools_common=\"diffuse ecmerge emerge kdiff3 meld opendiff\n-\t\t\ttkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3\n+\t\t\ttkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare\n \"\n \n _git_difftool ()\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex f730253..54cb708 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -126,7 +126,7 @@ list_merge_tool_candidates () {\n \t\telse\n \t\t\ttools=\"opendiff kdiff3 tkdiff xxdiff meld $tools\"\n \t\tfi\n-\t\ttools=\"$tools gvimdiff diffuse ecmerge p4merge araxis bc3\"\n+\t\ttools=\"$tools gvimdiff diffuse ecmerge p4merge araxis bc3 codecompare\"\n \tfi\n \tcase \"${VISUAL:-$EDITOR}\" in\n \t*vim*)\ndiff --git a/mergetools/codecompare b/mergetools/codecompare\nnew file mode 100644\nindex 0000000..3f0486b\n--- /dev/null\n+++ b/mergetools/codecompare\n@@ -0,0 +1,25 @@\n+diff_cmd () {\n+\t\"$merge_tool_path\" \"$LOCAL\" \"$REMOTE\"\n+}\n+\n+merge_cmd () {\n+\ttouch \"$BACKUP\"\n+\tif $base_present\n+\tthen\n+\t\t\"$merge_tool_path\" -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" \\\n+\t\t\t-RF=\"$MERGED\"\n+\telse\n+\t\t\"$merge_tool_path\" -MF=\"$LOCAL\" -TF=\"$REMOTE\" \\\n+\t\t\t-RF=\"$MERGED\"\n+\tfi\n+\tcheck_unchanged\n+}\n+\n+translate_merge_tool_path() {\n+\tif merge_mode\n+\tthen\n+\t\techo CodeMerge\n+\telse\n+\t\techo CodeCompare\n+\tfi\n+}\n-- \n1.7.9.6 (Apple Git-31.1)\n"}]}