summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 92b7ba1)
raw | patch | inline | side by side (parent: 92b7ba1)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 25 Nov 2007 23:15:48 +0000 (15:15 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 25 Nov 2007 23:56:55 +0000 (15:56 -0800) |
When you cherry-pick or revert a commit, naming it with an annotated
tag, we added a comment, attempting to repeat what we got from the end
user, to the message.
But this was inconsistent. When we got "cherry-pick branch", we
recorded the object name (40-letter SHA-1) without saying anything like
"original was 'branch'". There was no need to. Also recent rewrite to
use parse-options made it impossible to parrot the original command line
without "unparsing".
This removes the code that implements the misguided "we dereferenced the
tag so record that in the commit message" behaviour.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tag, we added a comment, attempting to repeat what we got from the end
user, to the message.
But this was inconsistent. When we got "cherry-pick branch", we
recorded the object name (40-letter SHA-1) without saying anything like
"original was 'branch'". There was no need to. Also recent rewrite to
use parse-options made it impossible to parrot the original command line
without "unparsing".
This removes the code that implements the misguided "we dereferenced the
tag so record that in the commit message" behaviour.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-revert.c | patch | blob | history |
diff --git a/builtin-revert.c b/builtin-revert.c
index 365b330f9e1f2989683611077d260fa49abcb889..a0586f9753189d13d5af1c790ea875a5f383f34f 100644 (file)
--- a/builtin-revert.c
+++ b/builtin-revert.c
NULL
};
-static int edit, no_replay, no_commit, needed_deref, mainline;
+static int edit, no_replay, no_commit, mainline;
static enum { REVERT, CHERRY_PICK } action;
static struct commit *commit;
if (commit->object.type == OBJ_TAG) {
commit = (struct commit *)
deref_tag((struct object *)commit, arg, strlen(arg));
- needed_deref = 1;
}
if (commit->object.type != OBJ_COMMIT)
die ("'%s' does not point to a commit", arg);
add_to_msg(")\n");
}
}
- if (needed_deref) {
- add_to_msg("(original 'git ");
- add_to_msg(me);
- add_to_msg("' arguments: ");
- for (i = 0; i < argc; i++) {
- if (i)
- add_to_msg(" ");
- add_to_msg(argv[i]);
- }
- add_to_msg(")\n");
- }
if (merge_recursive(sha1_to_hex(base->object.sha1),
sha1_to_hex(head), "HEAD",