{"thread":{"id":"5829","subject":"Could we please make \"cherry-pick\" not add the message by default?","startedAt":"2006-10-06T00:14:29Z","lastAt":"2006-10-06T01:20:55Z","messageCount":4,"participants":["Linus Torvalds","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"28262","messageId":"Pine.LNX.4.64.0610051711310.3952@g5.osdl.org","threadId":"5829","inReplyTo":null,"subject":"Could we please make \"cherry-pick\" not add the message by default?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-10-06T00:14:29Z","receivedAt":"2006-10-06T00:14:29Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nIt appears that more and more people are finding \"git cherry-pick\", and we \nnow have a number of totally inane\n\n\tcherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit\n\nmessages in the kernel logs, because I don't want to just re-cherry-pick \nthem and edit peoples logs.\n\nThose messages not only make no grammatical sense (you'd say \"commit X\" \nrather than \"X commit\"), but they have no point. The original commit is \nnot reachable and makes no sense any more, and that's actually likely to \nalways be the common case.\n\nSo could we just (a) fix the message word order to make sense and (b) make \nit only happen if people explicitly ask for it, rather than by default?\n\n\t\tLinus\n"},{"id":"28264","messageId":"7v1wpm5lih.fsf@assigned-by-dhcp.cox.net","threadId":"5829","inReplyTo":"Pine.LNX.4.64.0610051711310.3952@g5.osdl.org","subject":"Re: Could we please make \"cherry-pick\" not add the message by default?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-06T00:35:34Z","receivedAt":"2006-10-06T00:35:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> It appears that more and more people are finding \"git cherry-pick\", and we \n> now have a number of totally inane\n>\n> \tcherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit\n>\n> messages in the kernel logs, because I don't want to just re-cherry-pick \n> them and edit peoples logs.\n>\n> Those messages not only make no grammatical sense (you'd say \"commit X\" \n> rather than \"X commit\"), but they have no point. The original commit is \n> not reachable and makes no sense any more, and that's actually likely to \n> always be the common case.\n>\n> So could we just (a) fix the message word order to make sense and (b) make \n> it only happen if people explicitly ask for it, rather than by default?\n\nLet's do (c) never show it and make -r a no-op.\n"},{"id":"28265","messageId":"7vsli245zp.fsf@assigned-by-dhcp.cox.net","threadId":"5829","inReplyTo":"Pine.LNX.4.64.0610051711310.3952@g5.osdl.org","subject":"[PATCH] cherry-pick: make -r the default","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-06T00:56:10Z","receivedAt":"2006-10-06T00:56:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"And introduce -x to expose (possibly) private commit object name\nfor people who cherry-pick between public branches.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n * We discussed about this a few times already and every time I\n   end up forgetting.  I noticed the topic on the kernel list a\n   few days ago again.\n\n   Thanks for reminding.  Does the rationale and warning for -x\n   in the documentation look Ok?\n\n Documentation/git-cherry-pick.txt |   23 ++++++++++++++++-------\n git-revert.sh                     |   12 +++++++-----\n 2 files changed, 23 insertions(+), 12 deletions(-)\n\ndiff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt\nindex bfa950c..875edb6 100644\n--- a/Documentation/git-cherry-pick.txt\n+++ b/Documentation/git-cherry-pick.txt\n@@ -7,7 +7,7 @@ git-cherry-pick - Apply the change intro\n \n SYNOPSIS\n --------\n-'git-cherry-pick' [--edit] [-n] [-r] <commit>\n+'git-cherry-pick' [--edit] [-n] [-x] <commit>\n \n DESCRIPTION\n -----------\n@@ -24,13 +24,22 @@ OPTIONS\n \tWith this option, `git-cherry-pick` will let you edit the commit\n \tmessage prior committing.\n \n--r|--replay::\n-\tUsually the command appends which commit was\n+-x::\n+\tCause the command to append which commit was\n \tcherry-picked after the original commit message when\n-\tmaking a commit.  This option, '--replay', causes it to\n-\tuse the original commit message intact.  This is useful\n-\twhen you are reordering the patches in your private tree\n-\tbefore publishing.\n+\tmaking a commit.  Do not use this option if you are\n+\tcherry-picking from your private branch because the\n+\tinformation is useless to the recipient.  If on the\n+\tother hand you are cherry-picking between two publicly\n+\tvisible branches (e.g. backporting a fix to a\n+\tmaintenance branch for an older release from a\n+\tdevelopment branch), adding this information can be\n+\tuseful.\n+\n+-r|--replay::\n+\tIt used to be that the command defaulted to do `-x`\n+\tdescribed above, and `-r` was to disable it.  Now the\n+\tdefault is not to do `-x` so this option is a no-op.\n \n -n|--no-commit::\n \tUsually the command automatically creates a commit with\ndiff --git a/git-revert.sh b/git-revert.sh\nindex 2bf35d1..0784f74 100755\n--- a/git-revert.sh\n+++ b/git-revert.sh\n@@ -12,13 +12,13 @@ case \"$0\" in\n *-cherry-pick* )\n \tedit=\n \tme=cherry-pick\n-\tUSAGE='[--edit] [-n] [-r] <commit-ish>'  ;;\n+\tUSAGE='[--edit] [-n] [-r] [-x] <commit-ish>'  ;;\n * )\n \tdie \"What are you talking about?\" ;;\n esac\n . git-sh-setup\n \n-no_commit= replay=\n+no_commit= replay=t\n while case \"$#\" in 0) break ;; esac\n do\n \tcase \"$1\" in\n@@ -32,8 +32,10 @@ do\n \t--n|--no|--no-|--no-e|--no-ed|--no-edi|--no-edit)\n \t\tedit=\n \t\t;;\n-\t-r|--r|--re|--rep|--repl|--repla|--replay)\n-\t\treplay=t\n+\t-r)\n+\t\t: no-op ;;\n+\t-x|--i-really-want-to-expose-my-private-commit-object-name)\n+\t\treplay=\n \t\t;;\n \t-*)\n \t\tusage\n@@ -121,7 +123,7 @@ cherry-pick)\n \tgit-cat-file commit $commit | sed -e '1,/^$/d'\n \tcase \"$replay\" in\n \t'')\n-\t\techo \"(cherry picked from $commit commit)\"\n+\t\techo \"(cherry picked from commit $commit)\"\n \t\ttest \"$rev\" = \"$commit\" ||\n \t\techo \"(original 'git cherry-pick' arguments: $@)\"\n \t\t;;\n-- \n1.4.2.3.gae59\n"},{"id":"28267","messageId":"Pine.LNX.4.64.0610051820110.3952@g5.osdl.org","threadId":"5829","inReplyTo":"7vsli245zp.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] cherry-pick: make -r the default","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-10-06T01:20:55Z","receivedAt":"2006-10-06T01:20:55Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 5 Oct 2006, Junio C Hamano wrote:\n> \n>    Thanks for reminding.  Does the rationale and warning for -x\n>    in the documentation look Ok?\n\nLooks good, thanks.\n\n\t\tLinus\n"}]}