{"thread":{"id":"11018","subject":"[PATCH] revert/cherry-pick: do not mention the original ref","startedAt":"2007-11-25T23:15:48Z","lastAt":"2007-11-25T23:15:48Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"60887","messageId":"7vwss5j4rf.fsf@gitster.siamese.dyndns.org","threadId":"11018","inReplyTo":null,"subject":"[PATCH] revert/cherry-pick: do not mention the original ref","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-25T23:15:48Z","receivedAt":"2007-11-25T23:15:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When you cherry-pick or revert a commit, naming it with an annotated\ntag, we added a comment, attempting to repeat what we got from the end\nuser, to the message.\n\nBut this was inconsistent.  When we got \"cherry-pick branch\", we\nrecorded the object name (40-letter SHA-1) without saying anything like\n\"original was 'branch'\".  There was no need to.  Also recent rewrite to\nuse parse-options made it impossible to parrot the original command line\nwithout \"unparsing\".\n\nThis removes the code that implements the misguided \"we dereferenced the\ntag so record that in the commit message\" behaviour.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-revert.c |   14 +-------------\n 1 files changed, 1 insertions(+), 13 deletions(-)\n\ndiff --git a/builtin-revert.c b/builtin-revert.c\nindex 365b330..a0586f9 100644\n--- a/builtin-revert.c\n+++ b/builtin-revert.c\n@@ -30,7 +30,7 @@ static const char * const cherry_pick_usage[] = {\n \tNULL\n };\n \n-static int edit, no_replay, no_commit, needed_deref, mainline;\n+static int edit, no_replay, no_commit, mainline;\n static enum { REVERT, CHERRY_PICK } action;\n static struct commit *commit;\n \n@@ -66,7 +66,6 @@ static void parse_args(int argc, const char **argv)\n \tif (commit->object.type == OBJ_TAG) {\n \t\tcommit = (struct commit *)\n \t\t\tderef_tag((struct object *)commit, arg, strlen(arg));\n-\t\tneeded_deref = 1;\n \t}\n \tif (commit->object.type != OBJ_COMMIT)\n \t\tdie (\"'%s' does not point to a commit\", arg);\n@@ -333,17 +332,6 @@ static int revert_or_cherry_pick(int argc, const char **argv)\n \t\t\tadd_to_msg(\")\\n\");\n \t\t}\n \t}\n-\tif (needed_deref) {\n-\t\tadd_to_msg(\"(original 'git \");\n-\t\tadd_to_msg(me);\n-\t\tadd_to_msg(\"' arguments: \");\n-\t\tfor (i = 0; i < argc; i++) {\n-\t\t\tif (i)\n-\t\t\t\tadd_to_msg(\" \");\n-\t\t\tadd_to_msg(argv[i]);\n-\t\t}\n-\t\tadd_to_msg(\")\\n\");\n-\t}\n \n \tif (merge_recursive(sha1_to_hex(base->object.sha1),\n \t\t\t\tsha1_to_hex(head), \"HEAD\",\n"}]}