git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH 0/2] CHERRY_HEAD
@ 2011-02-15 21:23 Jay Soffian
  2011-02-15 21:23 ` [RFC/PATCH 1/2] Introduce CHERRY_HEAD Jay Soffian
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Jay Soffian @ 2011-02-15 21:23 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-02-17 14:10 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15 21:23 [RFC/PATCH 0/2] CHERRY_HEAD Jay Soffian
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).