{"thread":{"id":"39273","subject":"[PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","startedAt":"2015-05-08T16:53:55Z","lastAt":"2015-05-10T19:36:23Z","messageCount":14,"participants":["Ralf Thielow","Eric Sunshine","Junio C Hamano","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260819","messageId":"1431104035-2056-1-git-send-email-ralf.thielow@gmail.com","threadId":"39273","inReplyTo":null,"subject":"[PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2015-05-08T16:53:55Z","receivedAt":"2015-05-08T16:53:55Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"Printing a 40 character sha1 hash in the middle of a message\nstretches the sentence a lot. Print the abbreviated version\ninstead.\n\nSigned-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n---\n sequencer.c | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/sequencer.c b/sequencer.c\nindex c4f4b7d..2a39ab6 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -498,20 +498,21 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)\n \t\tstruct commit_list *p;\n \n \t\tif (!opts->mainline)\n-\t\t\treturn error(_(\"Commit %s is a merge but no -m option was given.\"),\n-\t\t\t\tsha1_to_hex(commit->object.sha1));\n+\t\t\treturn error(_(\"Commit %s... is a merge but no -m option was given.\"),\n+\t\t\t\tfind_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));\n \n \t\tfor (cnt = 1, p = commit->parents;\n \t\t     cnt != opts->mainline && p;\n \t\t     cnt++)\n \t\t\tp = p->next;\n \t\tif (cnt != opts->mainline || !p)\n-\t\t\treturn error(_(\"Commit %s does not have parent %d\"),\n-\t\t\t\tsha1_to_hex(commit->object.sha1), opts->mainline);\n+\t\t\treturn error(_(\"Commit %s... does not have parent %d\"),\n+\t\t\t\tfind_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV),\n+\t\t\t\topts->mainline);\n \t\tparent = p->item;\n \t} else if (0 < opts->mainline)\n-\t\treturn error(_(\"Mainline was specified but commit %s is not a merge.\"),\n-\t\t\tsha1_to_hex(commit->object.sha1));\n+\t\treturn error(_(\"Mainline was specified but commit %s... is not a merge.\"),\n+\t\t\tfind_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));\n \telse\n \t\tparent = commit->parents->item;\n \n-- \n2.4.0.228.gc627b12\n"},{"id":"260820","messageId":"CAPig+cSeNn0r7N6vp+qs4NTNwfYx5p-zUX3tkifuXLu+nB2yNQ@mail.gmail.com","threadId":"39273","inReplyTo":"1431104035-2056-1-git-send-email-ralf.thielow@gmail.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-05-08T17:10:57Z","receivedAt":"2015-05-08T17:10:57Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, May 8, 2015 at 12:53 PM, Ralf Thielow <ralf.thielow@gmail.com> wrote:\n> sequencer.c: abbreviate hashs placed in the middle of messages\n\ns/hashs/hashes/\n\n> Printing a 40 character sha1 hash in the middle of a message\n> stretches the sentence a lot. Print the abbreviated version\n> instead.\n>\n> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n> ---\n> diff --git a/sequencer.c b/sequencer.c\n> index c4f4b7d..2a39ab6 100644\n> --- a/sequencer.c\n> +++ b/sequencer.c\n> @@ -498,20 +498,21 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)\n>                 struct commit_list *p;\n>\n>                 if (!opts->mainline)\n> -                       return error(_(\"Commit %s is a merge but no -m option was given.\"),\n> -                               sha1_to_hex(commit->object.sha1));\n> +                       return error(_(\"Commit %s... is a merge but no -m option was given.\"),\n> +                               find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));\n\nAre short SHA1's followed by \"...\" anywhere else in the project? It\nseems strange to introduce such usage here.\n\n>                 for (cnt = 1, p = commit->parents;\n>                      cnt != opts->mainline && p;\n>                      cnt++)\n>                         p = p->next;\n>                 if (cnt != opts->mainline || !p)\n> -                       return error(_(\"Commit %s does not have parent %d\"),\n> -                               sha1_to_hex(commit->object.sha1), opts->mainline);\n> +                       return error(_(\"Commit %s... does not have parent %d\"),\n> +                               find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV),\n> +                               opts->mainline);\n>                 parent = p->item;\n>         } else if (0 < opts->mainline)\n> -               return error(_(\"Mainline was specified but commit %s is not a merge.\"),\n> -                       sha1_to_hex(commit->object.sha1));\n> +               return error(_(\"Mainline was specified but commit %s... is not a merge.\"),\n> +                       find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));\n>         else\n>                 parent = commit->parents->item;\n>\n> --\n> 2.4.0.228.gc627b12\n>\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"},{"id":"260821","messageId":"CAN0XMOK-7xok+3drBD-MhubSu9fjeHqunu8S5+1MB_BW6COW4Q@mail.gmail.com","threadId":"39273","inReplyTo":"CAPig+cSeNn0r7N6vp+qs4NTNwfYx5p-zUX3tkifuXLu+nB2yNQ@mail.gmail.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2015-05-08T17:20:03Z","receivedAt":"2015-05-08T17:20:03Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> wrote:\n\n> On Fri, May 8, 2015 at 12:53 PM, Ralf Thielow <ralf.thielow@gmail.com> wrote:\n>> sequencer.c: abbreviate hashs placed in the middle of messages\n>\n> s/hashs/hashes/\n\nThanks\n\n>\n>> Printing a 40 character sha1 hash in the middle of a message\n>> stretches the sentence a lot. Print the abbreviated version\n>> instead.\n>>\n>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n>> ---\n>> diff --git a/sequencer.c b/sequencer.c\n>> index c4f4b7d..2a39ab6 100644\n>> --- a/sequencer.c\n>> +++ b/sequencer.c\n>> @@ -498,20 +498,21 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)\n>>                 struct commit_list *p;\n>>\n>>                 if (!opts->mainline)\n>> -                       return error(_(\"Commit %s is a merge but no -m option was given.\"),\n>> -                               sha1_to_hex(commit->object.sha1));\n>> +                       return error(_(\"Commit %s... is a merge but no -m option was given.\"),\n>> +                               find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));\n>\n> Are short SHA1's followed by \"...\" anywhere else in the project? It\n> seems strange to introduce such usage here.\n>\n\nYes, that's why I used it.\n"},{"id":"260822","messageId":"xmqqbnhvm1f5.fsf@gitster.dls.corp.google.com","threadId":"39273","inReplyTo":"CAPig+cSeNn0r7N6vp+qs4NTNwfYx5p-zUX3tkifuXLu+nB2yNQ@mail.gmail.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-08T17:20:14Z","receivedAt":"2015-05-08T17:20:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Fri, May 8, 2015 at 12:53 PM, Ralf Thielow <ralf.thielow@gmail.com> wrote:\n>> sequencer.c: abbreviate hashs placed in the middle of messages\n>\n> s/hashs/hashes/\n> ...\n>> + return error(_(\"Commit %s... is a merge but no -m option was\n>> given.\"),\n>> +                               find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));\n>\n> Are short SHA1's followed by \"...\" anywhere else in the project? It\n> seems strange to introduce such usage here.\n\nThere are (and used to be the norm), as in \"git diff --raw\", for\nexample.\n\nBut I doubt the value of pointing out exact commit in the first\nplace, which leads me to say that \"no -m option was given but\nhistory has a merge\" might be a viable alternative.\n\nIf identifying the exact commit has value, on the other hand, we can\nrephrase it like this:\n\n\terror(_(\"no -m option was given to pick a merge '%s'\", ...));\n\nto place it not in the middle.  We can do similar rephrasing for\nother messages as well.\n\n>> -                       return error(_(\"Commit %s does not have parent %d\"),\n>> -                               sha1_to_hex(commit->object.sha1), opts->mainline);\n\n\terror(_(\"No parent %d for commit '%s'\", opts->mainline, ...);\n\n>> -               return error(_(\"Mainline was specified but commit %s is not a merge.\"),\n>> -                       sha1_to_hex(commit->object.sha1));\n\n\terror(_(\"-m option was given for non-merge commit '%s'\", ...);\n"},{"id":"260824","messageId":"CAN0XMOLhkTMWDr+eOsb5H8YiC1b7Nk0OKTSfi02ocr1unwFjfw@mail.gmail.com","threadId":"39273","inReplyTo":"xmqqbnhvm1f5.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2015-05-08T17:26:16Z","receivedAt":"2015-05-08T17:26:16Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n\n> If identifying the exact commit has value, on the other hand, we can\n> rephrase it like this:\n>\n>         error(_(\"no -m option was given to pick a merge '%s'\", ...));\n>\n> to place it not in the middle.  We can do similar rephrasing for\n> other messages as well.\n>\n>>> -                       return error(_(\"Commit %s does not have parent %d\"),\n>>> -                               sha1_to_hex(commit->object.sha1), opts->mainline);\n>\n>         error(_(\"No parent %d for commit '%s'\", opts->mainline, ...);\n>\n>>> -               return error(_(\"Mainline was specified but commit %s is not a merge.\"),\n>>> -                       sha1_to_hex(commit->object.sha1));\n>\n>         error(_(\"-m option was given for non-merge commit '%s'\", ...);\n\nThe %s can be placed to somewhere else in translations.\n"},{"id":"260825","messageId":"xmqq7fsjm0wb.fsf@gitster.dls.corp.google.com","threadId":"39273","inReplyTo":"CAN0XMOLhkTMWDr+eOsb5H8YiC1b7Nk0OKTSfi02ocr1unwFjfw@mail.gmail.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-08T17:31:32Z","receivedAt":"2015-05-08T17:31:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Thielow <ralf.thielow@gmail.com> writes:\n\n>>         error(_(\"-m option was given for non-merge commit '%s'\", ...);\n>\n> The %s can be placed to somewhere else in translations.\n\nThat is true for all the messages, and is something the l10n people\nneed to be aware of.\n\nWe've seen those who are careful to keep '%s' for longer strings\n(e.g. end-user controlled ones strings) at the end for this exact\nreason. I do not offhand recall if there were cases where we\ncommitted one version that had %s in the middle and then fixed\nlater to change that message in a separate commit, but there were\ncases where earlier messages with %s in the middle were fixed for\nthis exact reason in their rerolls.\n"},{"id":"260830","messageId":"CAN0XMOKPbKUMwU5-T78m_knt=9O2GkKaqmXKViSi5k-Z7Damrg@mail.gmail.com","threadId":"39273","inReplyTo":"xmqqbnhvm1f5.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2015-05-08T17:58:39Z","receivedAt":"2015-05-08T17:58:39Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> But I doubt the value of pointing out exact commit in the first\n> place, which leads me to say that \"no -m option was given but\n> history has a merge\" might be a viable alternative.\n>\n> If identifying the exact commit has value, on the other hand, we can\n> rephrase it like this:\n>\n\nIt has value since you see the hash and can check if you have\npassed a wrong commit accidently.\n\nI don't see why you suggest to rephrase the messages over an\nabbreviation of the hash. Is it because I wrote \"in the middle of\"?\nI think it's a good change anyway.\n\n>         error(_(\"no -m option was given to pick a merge '%s'\", ...));\n>\n> to place it not in the middle.  We can do similar rephrasing for\n> other messages as well.\n>\n>>> -                       return error(_(\"Commit %s does not have parent %d\"),\n>>> -                               sha1_to_hex(commit->object.sha1), opts->mainline);\n>\n>         error(_(\"No parent %d for commit '%s'\", opts->mainline, ...);\n>\n>>> -               return error(_(\"Mainline was specified but commit %s is not a merge.\"),\n>>> -                       sha1_to_hex(commit->object.sha1));\n>\n>         error(_(\"-m option was given for non-merge commit '%s'\", ...);\n"},{"id":"260836","messageId":"xmqqtwvmlxlo.fsf@gitster.dls.corp.google.com","threadId":"39273","inReplyTo":"CAN0XMOKPbKUMwU5-T78m_knt=9O2GkKaqmXKViSi5k-Z7Damrg@mail.gmail.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-08T18:42:43Z","receivedAt":"2015-05-08T18:42:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Thielow <ralf.thielow@gmail.com> writes:\n\n> Junio C Hamano <gitster@pobox.com> wrote:\n>> But I doubt the value of pointing out exact commit in the first\n>> place, which leads me to say that \"no -m option was given but\n>> history has a merge\" might be a viable alternative.\n>>\n>> If identifying the exact commit has value, on the other hand, we can\n>> rephrase it like this:\n>\n> It has value since you see the hash and can check if you have\n> passed a wrong commit accidently.\n\nLet's say by mistake I applied your patch while I had 'master'\nchecked out, and I want to cherry-pick it to its own branch, by\ndoing something like\n\n    $ git checkout -b rt/sequencer-error-messages maint\n    $ git cherry-pick <branch-name-here>\n\nand typed next by mistake instead of master in the above.  I should\nget \"that commit is a merge but you didn't tell me relative to which\nof its parents you want the changes ported\".\n\nDoes it make it any clearer to say \"commit 38e707... is a merge\"\ncompared to \"commit you gave me is a merge\", with or without\nabbreviation?\n\nI do not think so.  I know I said \"git cherry-pick next\".\n\n> I don't see why you suggest to rephrase the messages over an\n> abbreviation of the hash. Is it because I wrote \"in the middle of\"?\n\nNo.\n\nI am merely making sure that the original problem is well analysed\nand we looked at other possibilities before picking one, i.e. making\nsure that we did not pick the one merely because it happened to be\nan expedient thing to do.\n\nAnd shortening the output feels to me a more expedient thing to do\nbecause we do not have to analyse the ramification of possible\ninformation loss (your \"It has value since...\").  If we analyse the\nissue well, we might realize that there is little point in showing\nthe commit object name in hexadecimal, be it in full or in shortened\nform.\n\nIf the proposal were to parrot what the user typed on the command\nline, e.g. one of these (or their rephrased versions)\n\n\terror: commit 'next' is a merge but no -m option was given.\n\terror: no -m option was given to pick a merge 'next'.\n\nagainst the above example, then I would say that would be an\nimprovement, but that is not what is being discussed, so...\n"},{"id":"260849","messageId":"CAN0XMO+ZY-oXb1aWK3TzUxDRuBEEoasxjdagYQQoB+JVheju9Q@mail.gmail.com","threadId":"39273","inReplyTo":"xmqqtwvmlxlo.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2015-05-08T19:56:58Z","receivedAt":"2015-05-08T19:56:58Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n\n> And shortening the output feels to me a more expedient thing to do\n> because we do not have to analyse the ramification of possible\n> information loss (your \"It has value since...\").  If we analyse the\n> issue well, we might realize that there is little point in showing\n> the commit object name in hexadecimal, be it in full or in shortened\n> form.\n>\n> If the proposal were to parrot what the user typed on the command\n> line, e.g. one of these (or their rephrased versions)\n>\n>         error: commit 'next' is a merge but no -m option was given.\n>         error: no -m option was given to pick a merge 'next'.\n>\n> against the above example, then I would say that would be an\n> improvement, but that is not what is being discussed, so...\n\nCommits to be merged don't have to be branches.\n\nOK. So let's stay with 40 character hash in the messages.\n"},{"id":"260854","messageId":"xmqqa8xekeb2.fsf@gitster.dls.corp.google.com","threadId":"39273","inReplyTo":"CAN0XMO+ZY-oXb1aWK3TzUxDRuBEEoasxjdagYQQoB+JVheju9Q@mail.gmail.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-08T20:24:49Z","receivedAt":"2015-05-08T20:24:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Thielow <ralf.thielow@gmail.com> writes:\n\n> Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> And shortening the output feels to me a more expedient thing to do\n>> because we do not have to analyse the ramification of possible\n>> information loss (your \"It has value since...\").  If we analyse the\n>> issue well, we might realize that there is little point in showing\n>> the commit object name in hexadecimal, be it in full or in shortened\n>> form.\n>>\n>> If the proposal were to parrot what the user typed on the command\n>> line, e.g. one of these (or their rephrased versions)\n>>\n>>         error: commit 'next' is a merge but no -m option was given.\n>>         error: no -m option was given to pick a merge 'next'.\n>>\n>> against the above example, then I would say that would be an\n>> improvement, but that is not what is being discussed, so...\n>\n> Commits to be merged don't have to be branches.\n\nI am not sure how that changes anything.\n\n    $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n    error: that commit is a merge and you didn't give me -m <which-parent>\n\n    $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n    error: the commit 38e707... is a merge and you didn't give me -m <which-parent>\n\nPuzzled.\n"},{"id":"260862","messageId":"CAN0XMOJ6XnA+WAnpvMANSh_FnLoDyZ++5v9M2R-ZdOLHbSiJLg@mail.gmail.com","threadId":"39273","inReplyTo":"xmqqa8xekeb2.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2015-05-08T20:57:08Z","receivedAt":"2015-05-08T20:57:08Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n>\n> I am not sure how that changes anything.\n>\n>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>     error: that commit is a merge and you didn't give me -m <which-parent>\n>\n>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>     error: the commit 38e707... is a merge and you didn't give me -m <which-parent>\n>\n> Puzzled.\n\nIt doesn't change anything, obviously.\nThe patch was about showing sha1 in 40 character or 10 characters or so,\nin the current messages.\n"},{"id":"260923","messageId":"vpqwq0g2462.fsf@anie.imag.fr","threadId":"39273","inReplyTo":"xmqqa8xekeb2.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-05-10T09:05:41Z","receivedAt":"2015-05-10T09:05:41Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I am not sure how that changes anything.\n>\n>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>     error: that commit is a merge and you didn't give me -m <which-parent>\n>\n>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>     error: the commit 38e707... is a merge and you didn't give me -m <which-parent>\n\nBut ...\n\n    ./myscript.sh\n    error: that commit is a merge and you didn't give me -m <which-parent>\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"260933","messageId":"xmqqzj5cfdit.fsf@gitster.dls.corp.google.com","threadId":"39273","inReplyTo":"vpqwq0g2462.fsf@anie.imag.fr","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-10T19:17:30Z","receivedAt":"2015-05-10T19:17:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> I am not sure how that changes anything.\n>>\n>>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>>     error: that commit is a merge and you didn't give me -m <which-parent>\n>>\n>>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>>     error: the commit 38e707... is a merge and you didn't give me -m <which-parent>\n>\n> But ...\n>\n>     ./myscript.sh\n>     error: that commit is a merge and you didn't give me -m <which-parent>\n\nIf myscript.sh did not take the user input, what would the first\nthing you (who tried to run the script) would do?  At that point,\nfiguring out which wrong commit was fed to underlying cherry-pick\nbecomes a lot less important issue than figuring out _why_ the buggy\nscript fed a wrong commit to it, doesn't it?\n"},{"id":"260934","messageId":"vpqegmow7go.fsf@anie.imag.fr","threadId":"39273","inReplyTo":"xmqqzj5cfdit.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-05-10T19:36:23Z","receivedAt":"2015-05-10T19:36:23Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n>\n>> Junio C Hamano <gitster@pobox.com> writes:\n>>\n>>> I am not sure how that changes anything.\n>>>\n>>>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>>>     error: that commit is a merge and you didn't give me -m <which-parent>\n>>>\n>>>     $ git cherry-pick 38e70713119c25ab5699df6b2fb13e4133d399ab\n>>>     error: the commit 38e707... is a merge and you didn't give me -m <which-parent>\n>>\n>> But ...\n>>\n>>     ./myscript.sh\n>>     error: that commit is a merge and you didn't give me -m <which-parent>\n>\n> If myscript.sh did not take the user input, what would the first\n> thing you (who tried to run the script) would do?  At that point,\n> figuring out which wrong commit was fed to underlying cherry-pick\n> becomes a lot less important issue than figuring out _why_ the buggy\n> script fed a wrong commit to it, doesn't it?\n\nTrue, but knowing which commit was fed to cherry-pick may explain why it\ndid so. Sure, a developer could find out, but a user asking a question\nor reporting an issue is more effective when the error message contains\nas much information as possible.\n\n(Admittedly, in this senario, I should have written\n./someone-else-s-script.sh ;-) )\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}