{"thread":{"id":"7104","subject":"[PATCH] cherry-pick: Bug fix 'cherry picked from' message.","startedAt":"2007-03-06T05:46:00Z","lastAt":"2007-03-06T11:03:30Z","messageCount":3,"participants":["Shawn O. Pearce","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"36418","messageId":"20070306054600.GA24206@spearce.org","threadId":"7104","inReplyTo":null,"subject":"[PATCH] cherry-pick: Bug fix 'cherry picked from' message.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-03-06T05:46:00Z","receivedAt":"2007-03-06T05:46:00Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Somewhere along the line (in abd6970a) git-revert.sh learned to\nomit the private object name from the new commit message *unless*\n-x was supplied on the command line by the user.\n\nThe way this was implemented is really non-obvious in the original\nscript.  Setting replay=t (the default) means we don't include the\nthe private object name, while setting reply='' (the -x flag) means\nwe should include the private object name.  These two settings now\nrelate to the replay=1 and replay=0 cases in the C version, so we\nneed to negate replay to test it is 0.\n\nI also noticed the C version was adding an extra LF in the -x case,\nwhere the older git-revert.sh was not.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n builtin-revert.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-revert.c b/builtin-revert.c\nindex 382fe0c..2f2dc1b 100644\n--- a/builtin-revert.c\n+++ b/builtin-revert.c\n@@ -303,8 +303,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)\n \t\tnext = commit;\n \t\tset_author_ident_env(message);\n \t\tadd_message_to_msg(message);\n-\t\tif (replay) {\n-\t\t\tadd_to_msg(\"\\n(cherry picked from commit \");\n+\t\tif (!replay) {\n+\t\t\tadd_to_msg(\"(cherry picked from commit \");\n \t\t\tadd_to_msg(sha1_to_hex(commit->object.sha1));\n \t\t\tadd_to_msg(\")\\n\");\n \t\t}\n-- \n1.5.0.3.863.gf0989\n"},{"id":"36422","messageId":"7vabyqual4.fsf@assigned-by-dhcp.cox.net","threadId":"7104","inReplyTo":"20070306054600.GA24206@spearce.org","subject":"Re: [PATCH] cherry-pick: Bug fix 'cherry picked from' message.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-06T06:53:27Z","receivedAt":"2007-03-06T06:53:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"},{"id":"36454","messageId":"Pine.LNX.4.63.0703061203130.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7104","inReplyTo":"20070306054600.GA24206@spearce.org","subject":"Re: [PATCH] cherry-pick: Bug fix 'cherry picked from' message.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-06T11:03:30Z","receivedAt":"2007-03-06T11:03:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Shawn,\n\nthanks for the fixup!\n\nCiao,\nDscho\n"}]}