CHERRY_HEAD
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 22 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Introduce CHERRY_HEADbranch.c builtin/ builtin/ | +22 | 8 replies | |
| 2/2 | Teach commit to handle CHERRY_HEAD automaticallyDocumentation/ builtin/ builtin/ +1 more | +37 | 9 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Jonathan Nieder |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC/PATCH 0/2] CHERRY_HEAD
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(-)
Signature · 1 line
1.7.4.5.g9affb