Thread (17 messages) flat view 17 messages, 4 authors, 2016-06-15
STALE3732d

Revision v2 of 2 in this series.

Revisions (2)
  1. rfc [diff vs current]
  2. v2 current

[PATCH v2 0/3] Re: cherry-pick/revert error messages

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:52:30

Hi again,

Jonathan Nieder wrote:
Ramkumar Ramachandra wrote:
quoted
Looks much better!  Yes, a series pretty'fying error messages would be
really nice.
Good to hear.  Here's a rough one.
Here's a less rough version.  Same scope.

Patch 1 renames --reset to --quit, keeping --reset as a synonym for
backward compatibility this time.  I don't suspect anyone was using
--reset, but splitting out the backward-incompatible changes seems
like a useful habit to follow nonetheless.

Patch 2 is a small code cleanup in preparation for patch 3, unchanged
from v1.

The change description for patch 3 said 'double redundant first
"error:" message', which was kind of amusing.  This time it says
'redundant first "error:" message'.

More notably, this version has some bonus patches:

Patch 4 introduces the REVERT_HEAD pseudoref, which is analagous to
CHERRY_PICK_HEAD except it is populated by "git revert" and does not
influence the behavior of "git commit".  This could allow tools like
__git_ps1 to detect when we are in the middle of a conflicted revert,
though the series does not include a patch to do that.  I'm kind of
fond of it.

Patch 5 introduces a "git cherry-pick --abort" command that rolls back
the series of commits made so far in a conflicted cherry-pick.
Compare --quit, which tells cherry-pick to leave HEAD alone and get
out of the way.

Patch 6 removes the --reset compatibility option.  There might not be
much reason to do that, aside from removing clutter and saving a few
bytes.  The alternate motivation of removing the option to prevent
people from relying on it seems less compelling after patch 1 made it
harder to stumble upon the option.

May the series can provide some amusement.

Thanks to Junio and Jakub for the useful feedback so far.

Jonathan Nieder (3):
  revert: rename --reset option to --quit
  revert: rearrange pick_revisions() for clarity
  revert: improve error message for cherry-pick during cherry-pick

 Documentation/git-cherry-pick.txt |    2 +-
 Documentation/git-revert.txt      |    2 +-
 Documentation/sequencer.txt       |   10 ++--
 builtin/revert.c                  |   74 +++++++++++++++++++------------------
 sequencer.h                       |    2 +-
 t/t3510-cherry-pick-sequence.sh   |   31 +++++++++++++--
 t/t7106-reset-sequence.sh         |    2 +-
 7 files changed, 73 insertions(+), 50 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help