From: Jay Soffian <jaysoffian@gmail.com>
To: git@vger.kernel.org
Cc: Jay Soffian <jaysoffian@gmail.com>
Subject: [RFC/PATCH 0/2] CHERRY_HEAD
Date: Tue, 15 Feb 2011 16:23:52 -0500 [thread overview]
Message-ID: <1297805034-3512-1-git-send-email-jaysoffian@gmail.com> (raw)
The user-experience after a cherry-pick conflicts is suboptimal.
The user has two choices for committing the resolved state:
1. To retain the original authorship and commit message, the user can
'git commit -c <original commit id>'. This is what cherry-pick itself
advises. In this case MERGE_MSG (generated during the cherry-pick) is
ignored. That's bad since MERGE_MSG contains the list of conflicts
which is nice to have in the new commit. If 'cherry pick -x' was used,
the -x annotation is lost. Asking the user to remember the original
commit id is also a bit harsh.
2. To reset the authorship, the user can 'git commit'. This will use the
MERGE_MSG, but the original authorship is lost.
We fix both of these issues by recording the original commit in CHERRY_HEAD
if a conflict occurs during cherr-pick. We teach commit to use CHERRY_HEAD
to retrieve the original authorship (unless --reset-author is used), but
take the commit message from MERGE_MSG.
A further improvement would be to teach cherry-pick --continue and --abort
options a la rebase, but I think that should be prototyped in shell-script.
Jay Soffian (2):
Introduce CHERRY_HEAD
Teach commit to handle CHERRY_HEAD automatically
Documentation/git-commit.txt | 7 +++--
branch.c | 1 +
builtin/commit.c | 36 ++++++++++++++++++++++++++-----
builtin/revert.c | 20 ++++++++++++++++-
contrib/completion/git-completion.bash | 2 +
5 files changed, 55 insertions(+), 11 deletions(-)
--
1.7.4.5.g9affb
next reply other threads:[~2011-02-15 21:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 21:23 Jay Soffian [this message]
2011-02-15 21:23 ` [RFC/PATCH 1/2] Introduce CHERRY_HEAD Jay Soffian
2011-02-15 22:13 ` Junio C Hamano
2011-02-15 22:18 ` Jonathan Nieder
2011-02-15 22:59 ` Junio C Hamano
2011-02-15 23:02 ` Bert Wesarg
2011-02-15 23:10 ` Junio C Hamano
2011-02-15 23:42 ` Bert Wesarg
2011-02-15 23:07 ` Jay Soffian
2011-02-15 23:08 ` Jonathan Nieder
2011-02-15 21:23 ` [RFC/PATCH 2/2] Teach commit to handle CHERRY_HEAD automatically Jay Soffian
2011-02-15 22:16 ` Jay Soffian
2011-02-15 22:34 ` Junio C Hamano
2011-02-15 23:00 ` Jonathan Nieder
2011-02-15 23:21 ` Jay Soffian
2011-02-15 23:47 ` Jonathan Nieder
2011-02-16 0:03 ` Jay Soffian
2011-02-16 0:08 ` Jonathan Nieder
2011-02-16 0:05 ` [PATCH] Documentation: clarify interaction of --reset-author with --author Jonathan Nieder
2011-02-16 1:04 ` Junio C Hamano
2011-02-15 21:51 ` [RFC/PATCH 0/2] CHERRY_HEAD Ævar Arnfjörð Bjarmason
2011-02-15 22:10 ` Junio C Hamano
2011-02-15 22:13 ` Jay Soffian
2011-02-15 22:30 ` Ævar Arnfjörð Bjarmason
2011-02-15 22:11 ` Jay Soffian
2011-02-16 1:48 ` Miles Bader
2011-02-17 14:09 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297805034-3512-1-git-send-email-jaysoffian@gmail.com \
--to=jaysoffian@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.