{"thread":{"id":"17283","subject":"[PATCH] mergetool merge/skip/abort","startedAt":"2009-01-21T14:37:20Z","lastAt":"2009-01-27T22:37:16Z","messageCount":17,"participants":["Caleb Cushing","Johannes Schindelin","Charles Bailey","Markus Heidelberg","Junio C Hamano","Nanako Shiraishi","Theodore Tso"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"101387","messageId":"81bfc67a0901210637j52fa7a55q51b599e9ff16f6dc@mail.gmail.com","threadId":"17283","inReplyTo":null,"subject":"[PATCH] mergetool merge/skip/abort","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2009-01-21T14:37:20Z","receivedAt":"2009-01-21T14:37:20Z","isPatch":true,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"There are some files that I can't merge with git, and sometimes you\njust want to finish merging later or move on to the next file and come\nback later. My patch allows you to quit mergetool without ctrl-c, or\nmove on to the next file or merge the this one. pretty simple and I\nthink will be useful for a lot of people.\n\n\n>From b647762ad179cdaaf9f844671fdf26074563b366 Mon Sep 17 00:00:00 2001\nFrom: Caleb Cushing <xenoterracide@gmail.com>\nDate: Tue, 20 Jan 2009 11:33:30 -0500\nSubject: [PATCH] mergetool merge/skip/abort\n add functionality to skip merging a file or abort from the merge\n\n---\n git-mergetool.sh |   24 ++++++++++++++++++++----\n 1 files changed, 20 insertions(+), 4 deletions(-)\n\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex 00e1337..43d2a9e 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -177,11 +177,27 @@ merge_file () {\n     describe_file \"$local_mode\" \"local\" \"$LOCAL\"\n     describe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n     if \"$prompt\" = true; then\n-       printf \"Hit return to start merge resolution tool (%s): \" \"$merge_tool\"\n-       read ans\n-    fi\n+               while true; do\n+               printf \"Use (m)erge file or (s)skip file, or (a)bort? (%s): \" \\\n+               \"$merge_tool\"\n+               read ans\n+               case \"$ans\" in\n+                       [mM]*)\n+                       break\n+                       ;;\n+                       [sS]*)\n+                       cleanup_temp_files\n+                       return 0\n+                       ;;\n+                       [aA]*)\n+                       cleanup_temp_files\n+                       exit 0\n+                       ;;\n+               esac\n+               done\n+       fi\n\n-    case \"$merge_tool\" in\n+       case \"$merge_tool\" in\n        kdiff3)\n            if base_present ; then\n                (\"$merge_tool_path\" --auto --L1 \"$MERGED (Base)\" --L2\n\"$MERGED (Local)\" --L3 \"$MERGED (Remote)\" \\\n--\n1.6.1\n\n\n\n\n\n\n-- \nCaleb Cushing\n\nhttp://xenoterracide.blogspot.com\n"},{"id":"101401","messageId":"81bfc67a0901210817r49971c09kea9dc8ee5ae21572@mail.gmail.com","threadId":"17283","inReplyTo":"81bfc67a0901210637j52fa7a55q51b599e9ff16f6dc@mail.gmail.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2009-01-21T16:17:52Z","receivedAt":"2009-01-21T16:17:52Z","isPatch":true,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"just a typo fix in the patch\n\n>From 29c2873861a3aec8304529735307385e9e5c248a Mon Sep 17 00:00:00 2001\nFrom: Caleb Cushing <xenoterracide@gmail.com>\nDate: Tue, 20 Jan 2009 11:33:30 -0500\nSubject: [PATCH] mergetool merge/skip/abort\n add functionality to skip merging a file or abort from the merge\n\n---\n git-mergetool.sh |   24 ++++++++++++++++++++----\n 1 files changed, 20 insertions(+), 4 deletions(-)\n\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex 00e1337..ae94300 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -177,11 +177,27 @@ merge_file () {\n     describe_file \"$local_mode\" \"local\" \"$LOCAL\"\n     describe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n     if \"$prompt\" = true; then\n-       printf \"Hit return to start merge resolution tool (%s): \" \"$merge_tool\"\n-       read ans\n-    fi\n+               while true; do\n+               printf \"Use (m)erge file or (s)kip file, or (a)bort? (%s): \" \\\n+               \"$merge_tool\"\n+               read ans\n+               case \"$ans\" in\n+                       [mM]*)\n+                       break\n+                       ;;\n+                       [sS]*)\n+                       cleanup_temp_files\n+                       return 0\n+                       ;;\n+                       [aA]*)\n+                       cleanup_temp_files\n+                       exit 0\n+                       ;;\n+               esac\n+               done\n+       fi\n\n-    case \"$merge_tool\" in\n+       case \"$merge_tool\" in\n        kdiff3)\n            if base_present ; then\n                (\"$merge_tool_path\" --auto --L1 \"$MERGED (Base)\" --L2\n\"$MERGED (Local)\" --L3 \"$MERGED (Remote)\" \\\n--\n1.6.1\n\n-- \nCaleb Cushing\n\nhttp://xenoterracide.blogspot.com\n"},{"id":"101403","messageId":"alpine.DEB.1.00.0901211730530.3586@pacific.mpi-cbg.de","threadId":"17283","inReplyTo":"81bfc67a0901210817r49971c09kea9dc8ee5ae21572@mail.gmail.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-21T16:33:33Z","receivedAt":"2009-01-21T16:33:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 21 Jan 2009, Caleb Cushing wrote:\n\n> just a typo fix in the patch\n> \n> >From 29c2873861a3aec8304529735307385e9e5c248a Mon Sep 17 00:00:00 2001\n> From: Caleb Cushing <xenoterracide@gmail.com>\n> Date: Tue, 20 Jan 2009 11:33:30 -0500\n> Subject: [PATCH] mergetool merge/skip/abort\n>  add functionality to skip merging a file or abort from the merge\n> \n> ---\n\nIf you look at other patch submissions, you will find that they all do it \ndifferently.  You will never see a \"Date:\" or \"Subject:\" line.  You will \nsee a much shorter commit subject.  And a more verbose commit message.\n\nSometimes, you will see that a commit message is not quite informative, or \ndoes not explain the _motivation_ why it should be a good idea to do what \nthe patch does, and me saying so very directly (but never meaning to \noffend).\n\nHth,\nDscho\n"},{"id":"101407","messageId":"20090121170434.GA21727@hashpling.org","threadId":"17283","inReplyTo":"81bfc67a0901210637j52fa7a55q51b599e9ff16f6dc@mail.gmail.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2009-01-21T17:04:34Z","receivedAt":"2009-01-21T17:04:34Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"On Wed, Jan 21, 2009 at 09:37:20AM -0500, Caleb Cushing wrote:\n> ---\n>  git-mergetool.sh |   24 ++++++++++++++++++++----\n>  1 files changed, 20 insertions(+), 4 deletions(-)\n> \n> diff --git a/git-mergetool.sh b/git-mergetool.sh\n> index 00e1337..43d2a9e 100755\n> --- a/git-mergetool.sh\n> +++ b/git-mergetool.sh\n> @@ -177,11 +177,27 @@ merge_file () {\n>      describe_file \"$local_mode\" \"local\" \"$LOCAL\"\n>      describe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n>      if \"$prompt\" = true; then\n> -       printf \"Hit return to start merge resolution tool (%s): \" \"$merge_tool\"\n> -       read ans\n> -    fi\n> +               while true; do\n> +               printf \"Use (m)erge file or (s)skip file, or (a)bort? (%s): \" \\\n> +               \"$merge_tool\"\n> +               read ans\n> +               case \"$ans\" in\n> +                       [mM]*)\n> +                       break\n> +                       ;;\n> +                       [sS]*)\n> +                       cleanup_temp_files\n> +                       return 0\n> +                       ;;\n> +                       [aA]*)\n> +                       cleanup_temp_files\n> +                       exit 0\n> +                       ;;\n> +               esac\n> +               done\n> +       fi\n\nThis looks to me like no merge will happen if --no-prompt/-y or\nmergetool.prompt is set to false. Have you tested with this option or\nhave I misread?\n\nAlso, I think you've lost some tabs. Mergetool does have some\ninconsistent tabbing but they way I've been aiming towards (which\nmatches most, but not all of git-mergetool.sh) is to use tabs == 8\nspaces for indents but to indent each level by 4 spaces. e.g. three\nlevels of indent is one tab plus four spaces.\n\nIt might be quite nice to offer the option of directly using an 'ours'\nor 'theirs' as an alternative to skip for binary files. A bit like\nsymlinks are handled in mergetool.\n\nCharles.\n"},{"id":"101415","messageId":"200901211949.53432.markus.heidelberg@web.de","threadId":"17283","inReplyTo":"81bfc67a0901210817r49971c09kea9dc8ee5ae21572@mail.gmail.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-01-21T18:49:53Z","receivedAt":"2009-01-21T18:49:53Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Caleb Cushing, 21.01.2009:\n>  git-mergetool.sh |   24 ++++++++++++++++++++----\n>  1 files changed, 20 insertions(+), 4 deletions(-)\n\n> +               case \"$ans\" in\n> +                       [mM]*)\n> +                       break\n\nI'd like to keep (additionally) the behaviour, that the merge starts\nwith just pressing <Enter>. Because what you mostly want to do, when\nusing git-mergetool, is actually merging.\n\n> -    case \"$merge_tool\" in\n> +       case \"$merge_tool\" in\n>         kdiff3)\n\nThis doesn't seem right.\n\nMarkus\n"},{"id":"101497","messageId":"81bfc67a0901212107i466335b3h863745902fb688c@mail.gmail.com","threadId":"17283","inReplyTo":"200901211949.53432.markus.heidelberg@web.de","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2009-01-22T05:07:27Z","receivedAt":"2009-01-22T05:07:27Z","isPatch":true,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"> This looks to me like no merge will happen if --no-prompt/-y or\n>  mergetool.prompt is set to false. Have you tested with this option or\n>  have I misread?\n\nsorry haven't tested as I don't use that. will test in the morning...\nif it doesn't work will try to get it working.\n\n>  Also, I think you've lost some tabs. Mergetool does have some\n>  inconsistent tabbing but they way I've been aiming towards (which\n>  matches most, but not all of git-mergetool.sh) is to use tabs == 8\n>  spaces for indents but to indent each level by 4 spaces. e.g. three\n>  levels of indent is one tab plus four spaces.\n\nthanks wasn't sure on the indentation, I set tabstop to 4 spaces in\nvim so my tabs look like your spaces. I'll correct in the next case.\n\n>  It might be quite nice to offer the option of directly using an 'ours'\n>  or 'theirs' as an alternative to skip for binary files. A bit like\n>  symlinks are handled in mergetool.\n\nI could look into it... at the same time I don't have a good test case\nso I'd rather leave it to someone else.\n\n\n> I'd like to keep (additionally) the behaviour, that the merge starts\n> with just pressing <Enter>. Because what you mostly want to do, when\n> using git-mergetool, is actually merging.\n\nI'd thought of that... and I'll see what I can do, although to me it\ndoesn't matter much.\n\n> This doesn't seem right.\n\nerm.. yeah... I'll fix it\n-- \nCaleb Cushing\n\nhttp://xenoterracide.blogspot.com\n"},{"id":"101528","messageId":"81bfc67a0901220617l22b5a8e4ma48bb069d67cae91@mail.gmail.com","threadId":"17283","inReplyTo":"20090121170434.GA21727@hashpling.org","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2009-01-22T14:17:39Z","receivedAt":"2009-01-22T14:17:39Z","isPatch":true,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":">From bf55fdd37f0fa4d0b3a10f43fa3d1815a6dbc6b3 Mon Sep 17 00:00:00 2001\nFrom: Caleb Cushing <xenoterracide@gmail.com>\nDate: Tue, 20 Jan 2009 11:33:30 -0500\nSubject: [PATCH] mergetool merge/skip/abort\n add functionality to skip merging a file or abort from mergetool\n\n---\n git-mergetool.sh |   20 ++++++++++++++++++--\n 1 files changed, 18 insertions(+), 2 deletions(-)\n\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex 00e1337..bd5711e 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -177,8 +177,24 @@ merge_file () {\n     describe_file \"$local_mode\" \"local\" \"$LOCAL\"\n     describe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n     if \"$prompt\" = true; then\n-       printf \"Hit return to start merge resolution tool (%s): \" \"$merge_tool\"\n-       read ans\n+        while true; do\n+            printf \"Use (m)erge file or (s)kip file, or (a)bort? (%s): \" \\\n+            \"$merge_tool\"\n+            read ans\n+            case \"$ans\" in\n+                [mM]*|\"\")\n+                    break\n+                ;;\n+                [sS]*)\n+                    cleanup_temp_files\n+                    return 0\n+                ;;\n+                [aA]*)\n+                    cleanup_temp_files\n+                    exit 0\n+                ;;\n+            esac\n+        done\n     fi\n\n     case \"$merge_tool\" in\n--\n1.6.1\n\n> This looks to me like no merge will happen if --no-prompt/-y or\n>  mergetool.prompt is set to false. Have you tested with this option or\n>  have I misread?\n\njust tested and it works fine... meaning it doesn't prompt which is\nwhat it's supposed to do.\n\n>  Also, I think you've lost some tabs. Mergetool does have some\n>  inconsistent tabbing but they way I've been aiming towards (which\n>  matches most, but not all of git-mergetool.sh) is to use tabs == 8\n>  spaces for indents but to indent each level by 4 spaces. e.g. three\n>  levels of indent is one tab plus four spaces.\n\nmixing tabs and spaces == bad, I just realized I can't see half your\nindents because I had tabstop=4 in my vimrc because I like indents at\n4 spaces which is what you are doing through emulation. this is why I\ngenerally just use tabs or spaces. files like fstab and .sql are my\nfew exceptions, both of which I do more on columns than indents.\n\n> I'd like to keep (additionally) the behaviour, that the merge starts\n> with just pressing <Enter>. Because what you mostly want to do, when\n> using git-mergetool, is actually merging.\n\ndone, and maybe you... but generally I've got more skips than merges,\nbut I've got a corner case.\n-- \nCaleb Cushing\n\nhttp://xenoterracide.blogspot.com\n"},{"id":"101531","messageId":"20090122142258.GA2316@hashpling.org","threadId":"17283","inReplyTo":"81bfc67a0901220617l22b5a8e4ma48bb069d67cae91@mail.gmail.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2009-01-22T14:22:58Z","receivedAt":"2009-01-22T14:22:58Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"On Thu, Jan 22, 2009 at 09:17:39AM -0500, Caleb Cushing wrote:\n> >  Also, I think you've lost some tabs. Mergetool does have some\n> >  inconsistent tabbing but they way I've been aiming towards (which\n> >  matches most, but not all of git-mergetool.sh) is to use tabs == 8\n> >  spaces for indents but to indent each level by 4 spaces. e.g. three\n> >  levels of indent is one tab plus four spaces.\n> \n> mixing tabs and spaces == bad, I just realized I can't see half your\n> indents because I had tabstop=4 in my vimrc because I like indents at\n> 4 spaces which is what you are doing through emulation. this is why I\n> generally just use tabs or spaces. files like fstab and .sql are my\n> few exceptions, both of which I do more on columns than indents.\n\nThere are two conventions at work in git-mergetool.sh but the most\nprevalent one (it was like that when I got here!) can be easily\nmaintained in vim with:\n\n:set tabstop=8\n:set softtabstop=4\n:set shiftwidth=4\n\nYou'll never (well, almost never) know that tabs aren't 4 spaces.\n\n-- \nCharles Bailey\nhttp://ccgi.hashpling.plus.com/blog/\n"},{"id":"101659","messageId":"81bfc67a0901230716i166bfc4chd9a5c0990b0cd3b6@mail.gmail.com","threadId":"17283","inReplyTo":"20090122142258.GA2316@hashpling.org","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2009-01-23T15:16:44Z","receivedAt":"2009-01-23T15:16:44Z","isPatch":true,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":">  You'll never (well, almost never) know that tabs aren't 4 spaces.\n\nno but I think people should be able to view indents at whatever they\nwant and still have it work, which is why I normally use tabs\nexclusively, and set it to 4 space display, but if people wanted to\nview at 2, 6, 8 spaces or whatever they could and the indents should\nstill look correct.\n\nit doesn't really matter to each project there own.\n\nso does my patch satisfy now? what's it take to get it included in the\nnext version of git?\n-- \nCaleb Cushing\n\nhttp://xenoterracide.blogspot.com\n"},{"id":"101669","messageId":"7vwscmue5z.fsf@gitster.siamese.dyndns.org","threadId":"17283","inReplyTo":"81bfc67a0901230716i166bfc4chd9a5c0990b0cd3b6@mail.gmail.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-23T17:26:32Z","receivedAt":"2009-01-23T17:26:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Caleb Cushing <xenoterracide@gmail.com> writes:\n\n> so does my patch satisfy now? what's it take to get it included in the\n> next version of git?\n\nI do not use mergetool myself so I generally do not pay attention to\npatches on this tool, but I would want to pick up ones that people\ninvolved in mergetool discussion can agree to be good patches.\n\nThere are a few mergetool updates in flight from various authors.  How\ndoes your submission compare with others' in both form/presentation and\nclarity of logic (remember, I am not keeping track)?\n"},{"id":"101757","messageId":"81bfc67a0901241036v6ca30c24q54487e118fd67c1c@mail.gmail.com","threadId":"17283","inReplyTo":"7vwscmue5z.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2009-01-24T18:36:32Z","receivedAt":"2009-01-24T18:36:32Z","isPatch":true,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"> I do not use mergetool myself so I generally do not pay attention to\n>  patches on this tool, but I would want to pick up ones that people\n>  involved in mergetool discussion can agree to be good patches.\n\nyeah I can see that.\n\n>  There are a few mergetool updates in flight from various authors.  How\n>  does your submission compare with others' in both form/presentation and\n>  clarity of logic (remember, I am not keeping track)?\n\nto be honest, a quick search of the past 2 months of patches didn't\nshow me any patches that do the same thing as mine, so I'm not sure\nthat comparing one feature to a different feature is good. I did try\nto remain consistent and even improve consistency with existing UI,\nand use the same/similar logic to existing.  I'm not keeping track\neither, just fixing my own problem.\n-- \nCaleb Cushing\n\nhttp://xenoterracide.blogspot.com\n"},{"id":"101785","messageId":"20090125064539.6117@nanako3.lavabit.com","threadId":"17283","inReplyTo":"81bfc67a0901241036v6ca30c24q54487e118fd67c1c@mail.gmail.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-01-24T21:45:39Z","receivedAt":"2009-01-24T21:45:39Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Caleb Cushing <xenoterracide@gmail.com>:\n\n>>  There are a few mergetool updates in flight from various authors.  How\n>>  does your submission compare with others' in both form/presentation and\n>>  clarity of logic (remember, I am not keeping track)?\n>\n> to be honest, a quick search of the past 2 months of patches didn't\n> show me any patches that do the same thing as mine, so I'm not sure\n> that comparing one feature to a different feature is good.\n\nJunio never asked what your patch does. He didn't ask if it does\nsomething similar to what other patches do, either.\n\nYour 81bfc67a0901220617l22b5a8e4ma48bb069d67cae91@mail.gmail.com with\n'Subject: Re: [PATCH] mergetool merge/skip/abort' that is sent to you and\n'Cc: git@vger.kernel.org' starts its body with:\n\n\tFrom bf55fdd37f0fa4d0b3a10f43fa3d1815a6dbc6b3 Mon Sep 17 00:00:00 2001\n\tFrom: Caleb Cushing <xenoterracide@gmail.com>\n\tDate: Tue, 20 Jan 2009 11:33:30 -0500\n\tSubject: [PATCH] mergetool merge/skip/abort\n\t add functionality to skip merging a file or abort from mergetool\n\n\t---\n\t git-mergetool.sh |   20 ++++++++++++++++++--\n\t 1 files changed, 18 insertions(+), 2 deletions(-)\n\nFor comparison, 1232578668-2203-1-git-send-email-charles@hashpling.org from\nCharles Bailey with 'Subject: [PATCH] mergetool: respect autocrlf by using\ncheckout-index', with 'Cc: Hannu Koivisto <azure@iki.fi>, Theodore Tso\n<tytso@mit.edu>' starts its message body this way:\n\n\tPreviously, git mergetool used cat-file which does not perform git to\n\tworktree conversion. This changes mergetool to use git checkout-index\n\tinstead which means that the temporary files used for mergetool use the\n\tcorrect line endings for the platform.\n\n\tSigned-off-by: Charles Bailey <charles@hashpling.org>\n\t---\n\t git-mergetool.sh     |   14 +++++++++++---\n\t t/t7610-mergetool.sh |   15 +++++++++++++--\n\t 2 files changed, 24 insertions(+), 5 deletions(-)\n\nAnother example is 1232702093-24313-1-git-send-email-heipei@hackvalue.de\nfrom Johannes Gilger with 'Subject: [PATCHv2] git mergetool: Don't repeat\nmerge tool candidates', sent to Junio, Theodore and the mailing list. Here\nis its message body:\n\n\tgit mergetool listed some candidates for mergetools twice, depending on\n\tthe environment.\n\n\tSigned-off-by: Johannes Gilger <heipei@hackvalue.de>\n\t---\n\tThe first patch had the fatal flaw that it listed nothing when DISPLAY \n\tand EDITOR/VISUAL were unset, we fixed that.\n\tThe order in which merge-candidates appear is still exactly the same, \n\tonly duplicates have been stripped. The check for KDE_FULL_SESSION was \n\tremoved since kdiff3 was added as long as DISPLAY was set and we weren't \n\trunning gnome.\n\n\t git-mergetool.sh |   16 ++++++++--------\n\t 1 files changed, 8 insertions(+), 8 deletions(-)\n\nLet's try to answer the first question Junio asked you together.\nCan you spot the differences? How do they compare?\n\n 1. You copy-and-pasted output from format-patch, and have the header\n    part in the message body. Charles and Johannes have moved them to the\n    Email header.\n\n    Their messages are in the form the tool used for patch acceptance\n    expects. Yours isn't, and forces Junio to manually edit your message\n    before handling it.\n\n 2. You have a two-line Subject: without any commit message. Both Charles\n    and Johannes describe what their patches are about on the Subject\n    succinctly in a single line, and they have what old behavior their\n    patches change, and how their patches do so in their commit\n    messages. They explained why it is good to apply their patches\n    well. You didn't.\n\n    Johannes Schindelin even pointed out this and the previous point when\n    you sent your first version but you seem to have ignored him.\n\n 3..You quoted other people's comments after the patch and explained that\n    you addressed the issues, but didn't include them in your Cc list.\n    Charles has Hanuu on his Cc list, and also Theodore (the original\n    author) who knows the best about the tool. Johannes also sent his\n    patch to people who gave him review comments.\n\n    They made efforts to make sure that their patches are seen by people\n    who helped refine thier patches and/or by people who knows the script\n    that you are modifying well. You didn't.\n\n 4. You didn't sign your patch.\n\n    Please see Documentation/SubmittingPatches.\n\nAbout the second question from Junio on the contents of the patch, I can\nguess some comments you may receive from him when he reads your patch,\nbased on review comments I received from him on another shell script\nrecently.\n\n\tdiff --git a/git-mergetool.sh b/git-mergetool.sh\n\tindex 00e1337..bd5711e 100755\n\t--- a/git-mergetool.sh\n\t+++ b/git-mergetool.sh\n\t@@ -177,8 +177,24 @@ merge_file () {\n\t     describe_file \"$local_mode\" \"local\" \"$LOCAL\"\n\t     describe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n\t     if \"$prompt\" = true; then\n\t-       printf \"Hit return to start merge resolution tool (%s): \" \"$merge_tool\"\n\t-       read ans\n\t+        while true; do\n\t+            printf \"Use (m)erge file or (s)kip file, or (a)bort? (%s): \" \\\n\t+            \"$merge_tool\"\n\t+            read ans\n\t+            case \"$ans\" in\n\t+                [mM]*|\"\")\n\t+                    break\n\t+                ;;\n\t+                [sS]*)\n\t+                    cleanup_temp_files\n\t+                    return 0\n\t+                ;;\n\t+                [aA]*)\n\t+                    cleanup_temp_files\n\t+                    exit 0\n\t+                ;;\n\t+            esac\n\t+        done\n\t     fi\n\n\t     case \"$merge_tool\" in\n\n 1. Your printf message is funny. You either\n\n      (1) Use $merge_tool to merge file, or\n      (2) Skip file, or\n      (3) Abort.\n\n    but your message makes it look like:\n\n      (1) Use $merge_tool to Merge file, or\n      (2) Use $merge_tool to Skip file, or\n      (3) Use $merge_tool to Abort.\n\n 2. patterns in case command start at the same column as case and esac,\n    and \";;\" is at the same column as any other commands.\n\n\tcase \"$ans\" in\n\t[mM]*|\"\")\n\t\tbreak\n\t\t;;\n\t[Ss]*)\n\t\t...\n\tesac\n\nFor what it's worth, I like what your patch does. I use mergetool from\ntime to time and I can imagine that this new feature will be useful.\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"101801","messageId":"81bfc67a0901241618kfaa79bcy8fdb16ecedf5f8b5@mail.gmail.com","threadId":"17283","inReplyTo":"20090125064539.6117@nanako3.lavabit.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2009-01-25T00:18:05Z","receivedAt":"2009-01-25T00:18:05Z","isPatch":true,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":">   1. You copy-and-pasted output from format-patch, and have the header\n>     part in the message body. Charles and Johannes have moved them to the\n>     Email header.\n>\n>     Their messages are in the form the tool used for patch acceptance\n>     expects. Yours isn't, and forces Junio to manually edit your message\n>     before handling it.\n\nI'll get to the rest later...\n\nbut I tried sending the patch via email as you said followed this...\nverbatim except replacing user@ and p4ssw0rd with my credentials, and\nI got an auth error back. currently I've no idea how I would send\nstuff from gmail. and I reject inline patches in funtoo because I use\nwebmail and they are impossible for me to handle easily.\n\nSubmitting properly formatted patches via Gmail is simple now that\nIMAP support is available. First, edit your ~/.gitconfig to specify your\naccount settings:\n\n[imap]\n    folder = \"[Gmail]/Drafts\"\n    host = imaps://imap.gmail.com\n    user = user@gmail.com\n    pass = p4ssw0rd\n    port = 993\n    sslverify = false\n\nNext, ensure that your Gmail settings are correct. In \"Settings\" the\n\"Use Unicode (UTF-8) encoding for outgoing messages\" should be checked.\n\nOnce your commits are ready to send to the mailing list, run the following\ncommand to send the patch emails to your Gmail Drafts folder.\n\n    $ git format-patch -M --stdout origin/master | git imap-send\n\n\n\n-- \nCaleb Cushing\n\nhttp://xenoterracide.blogspot.com\n"},{"id":"101817","messageId":"7vljt0j70w.fsf@gitster.siamese.dyndns.org","threadId":"17283","inReplyTo":"20090125064539.6117@nanako3.lavabit.com","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-25T05:20:47Z","receivedAt":"2009-01-25T05:20:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n>  2. patterns in case command start at the same column as case and esac,\n>     and \";;\" is at the same column as any other commands.\n>\n> \tcase \"$ans\" in\n> \t[mM]*|\"\")\n> \t\tbreak\n> \t\t;;\n> \t[Ss]*)\n> \t\t...\n> \tesac\n\nI generally prefer the above style, but mergetool is not mine, and the\npredominant style in it is:\n\n        case xyzzy in\n            frotz)\n                do this\n                ;;\n            nitfol)\n                do that\n                ;;\n        esac\n\nNamely, case arms' labels are indented by 4 spaces from case/esac, and the\ncommands in each case arm are further indented by 4 spaces (including the\nterminating double-semicolon).\n\nIt is always preferable to match the _local_ convention.  I'd expect a new\nscript added to git suite to match my preference (the one I showed you in\nmy comments to you that is used in git-am, which is what you suggested\nabove), but I'd expect a modification to mergetool to match the style\nmergetool already uses.\n\nIOW, Caleb's indentation style is fine.  The placement of double-semicolon\nis not, though.\n"},{"id":"102072","messageId":"20090126225835.GB10118@mit.edu","threadId":"17283","inReplyTo":"7vwscmue5z.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2009-01-26T22:58:35Z","receivedAt":"2009-01-26T22:58:35Z","isPatch":true,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Fri, Jan 23, 2009 at 09:26:32AM -0800, Junio C Hamano wrote:\n> Caleb Cushing <xenoterracide@gmail.com> writes:\n> \n> > so does my patch satisfy now? what's it take to get it included in the\n> > next version of git?\n> \n> I do not use mergetool myself so I generally do not pay attention to\n> patches on this tool, but I would want to pick up ones that people\n> involved in mergetool discussion can agree to be good patches.\n> \n> There are a few mergetool updates in flight from various authors.  How\n> does your submission compare with others' in both form/presentation and\n> clarity of logic (remember, I am not keeping track)?\n\nI was the original author of mergetool, and for a while I was the\nperson that was reviewing and managing the mergetool patches for\nJunio.  Unfortunately, in the last couple of months I just haven't had\nthe time keep up with the various mergetool proposed patch updates.\n\nSo maybe it's time for me to hand it off to someone who has the time\nand interest in continuing to hack mergetool, and has the necessary\n\"good taste\" and such that Junio would be willing to trust that person\nto be the git mergetool patch wrangler?\n\n\t\t\t\t\t\t\t- Ted\n"},{"id":"102168","messageId":"20090127220947.GA21319@hashpling.org","threadId":"17283","inReplyTo":"20090126225835.GB10118@mit.edu","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2009-01-27T22:09:47Z","receivedAt":"2009-01-27T22:09:47Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"On Mon, Jan 26, 2009 at 05:58:35PM -0500, Theodore Tso wrote:\n> I was the original author of mergetool, and for a while I was the\n> person that was reviewing and managing the mergetool patches for\n> Junio.  Unfortunately, in the last couple of months I just haven't had\n> the time keep up with the various mergetool proposed patch updates.\n> \n> So maybe it's time for me to hand it off to someone who has the time\n> and interest in continuing to hack mergetool, and has the necessary\n> \"good taste\" and such that Junio would be willing to trust that person\n> to be the git mergetool patch wrangler?\n> \n> \t\t\t\t\t\t\t- Ted\n\nA quick blame session has shown that after Ted I've probably touched\nthe next most number of lines of mergetool. It's a crude measure and\nnot necessarily a sign of competence, I admit.\n\nAlthough not rolling in spare time, I feel I'd be able review\nmergetool patches at roughly the rate that they tend to appear at the\nmoment.\n\nGiven the above, if I pass the \"good taste\" and \"Junio trust\" tests I\nfeel that I should offer my services as mergetool patch wrangler.\n\n-- \nCharles Bailey\nhttp://ccgi.hashpling.plus.com/blog/\n"},{"id":"102180","messageId":"7vk58g1ilf.fsf@gitster.siamese.dyndns.org","threadId":"17283","inReplyTo":"20090127220947.GA21319@hashpling.org","subject":"Re: [PATCH] mergetool merge/skip/abort","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-27T22:37:16Z","receivedAt":"2009-01-27T22:37:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Charles Bailey <charles@hashpling.org> writes:\n\n> On Mon, Jan 26, 2009 at 05:58:35PM -0500, Theodore Tso wrote:\n> ...\n> A quick blame session has shown that after Ted I've probably touched\n> the next most number of lines of mergetool. It's a crude measure and\n> not necessarily a sign of competence, I admit.\n>\n> Although not rolling in spare time, I feel I'd be able review\n> mergetool patches at roughly the rate that they tend to appear at the\n> moment.\n>\n> Given the above, if I pass the \"good taste\" and \"Junio trust\" tests I\n> feel that I should offer my services as mergetool patch wrangler.\n\nCompetence certainly counts to a certain extent, but volunteerism,\nwillingness, and enthusiasm count too.\n\nTaste is sometimes a relative thing and we can make sure where we agree to\ndisagree on the list case by case basis.\n\nMost importantly, anybody who will suffer when the tool breaks will be\nmuch better person than I to look after it.  That is one of the largest\ningredient in the \"trust\" factor.\n\nThanks.\n"}]}