diff options
author | Jay Soffian <jaysoffian@gmail.com> | 2011-02-19 23:12:29 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-21 22:58:32 -0800 |
commit | 37f7a8579363a98efc48dfb6964a519034fc9acc (patch) | |
tree | 0fc435a0e27b66668cfd5bab3e08112ecdcecc4c /Documentation/git-commit.txt | |
parent | 5b2af8cac9883ab7e666d4aa30ea7fd3d1f1d4de (diff) | |
download | git-37f7a8579363a98efc48dfb6964a519034fc9acc.tar.gz |
Teach commit about CHERRY_PICK_HEAD
Previously the user was advised to use commit -c CHERRY_PICK_HEAD after
a conflicting cherry-pick. While this would preserve the original
commit's authorship, it would sadly discard cherry-pick's carefully
crafted MERGE_MSG (which contains the list of conflicts as well as the
original commit-id in the case of cherry-pick -x).
On the other hand, if a bare 'commit' were performed, it would preserve
the MERGE_MSG while resetting the authorship.
In other words, there was no way to simultaneously take the authorship
from CHERRY_PICK_HEAD and the commit message from MERGE_MSG.
This change fixes that situation. A bare 'commit' will now take the
authorship from CHERRY_PICK_HEAD and the commit message from MERGE_MSG.
If the user wishes to reset authorship, that must now be done explicitly
via --reset-author.
A side-benefit of passing commit authorship along this way is that we
can eliminate redundant authorship parsing code from revert.c.
(Also removed an unused include from revert.c)
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-commit.txt')
-rw-r--r-- | Documentation/git-commit.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index b586c0f442..fd6a1f7e25 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -84,9 +84,10 @@ OPTIONS linkgit:git-rebase[1] for details. --reset-author:: - When used with -C/-c/--amend options, declare that the - authorship of the resulting commit now belongs of the committer. - This also renews the author timestamp. + When used with -C/-c/--amend options, or when committing after a + a conflicting cherry-pick, declare that the authorship of the + resulting commit now belongs of the committer. This also renews + the author timestamp. --short:: When doing a dry-run, give the output in the short-format. See |