Skip to content

Teach cherry-pick/revert to skip commits

Rohit Ashiwal git 9 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest5 patches 1 replyIn review
  2. v76 patches 2 repliesSuperseded
  3. v65 patches 1 replySuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v55 patches8 repliesSuperseded
v4 posting 2/24 patches2 repliesSuperseded
v4 posting 1/20 of 3 patches1 replySuperseded
v33 patches12 repliesSuperseded
v23 patches5 repliesSuperseded
v13 patches21 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5sequencer: add advice for revertDocumentation/config/advice.txt advice.c advice.h +1 more+34 -60 replies
2/5sequencer: rename reset_for_rollback to reset_mergesequencer.c+3 -30 replies
3/5sequencer: use argv_array in reset_mergesequencer.c+11 -60 replies
4/5cherry-pick/revert: add --skip optionDocumentation/git-cherry-pick.txt Documentation/git-revert.txt Documentation/sequencer.txt +4 more+187 -60 replies
5/5cherry-pick/revert: advise using --skipbuiltin/commit.c sequencer.c t/t3510-cherry-pick-sequence.sh+34 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [GSoC][PATCH v8 0/5] Teach cherry-pick/revert to skip commits

Another revision of my patch which takes care of all the nits.

Rohit Ashiwal (5):
sequencer: add advice for revert
sequencer: rename reset_for_rollback to reset_merge
sequencer: use argv_array in reset_merge cherry-pick/revert: add --skip option cherry-pick/revert: advise using --skip

 Documentation/config/advice.txt   |   2 +
 Documentation/git-cherry-pick.txt |   4 +-
 Documentation/git-revert.txt      |   4 +-
 Documentation/sequencer.txt       |   4 +
 advice.c                          |   2 +
 advice.h                          |   1 +
 builtin/commit.c                  |  13 +--
 builtin/revert.c                  |   5 ++
 sequencer.c                       | 134 ++++++++++++++++++++++++++----
 sequencer.h                       |   1 +
 t/t3510-cherry-pick-sequence.sh   | 122 +++++++++++++++++++++++++++
 11 files changed, 266 insertions(+), 26 deletions(-)

Range-diff:

1:  207042a895 < -:  ---------- advice: add sequencerInUse config variable
2:  d7c603d47f ! 1:  91d3949b69 sequencer: add advice for revert

@@ -3,14 +3,58 @@
sequencer: add advice for revert

In the case of merge conflicts, while performing a revert, we are
- currently advised to use git cherry-pick --<sequencer-options>
- of which --continue is incompatible for continuing the revert.
+ currently advised to use git cherry-pick --<sequencer-options>.
Introduce a separate advice message for git revert. Also change the signature of create_seq_dir to handle which advice to display selectively.

+ diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt
+ --- a/Documentation/config/advice.txt
+ +++ b/Documentation/config/advice.txt
+@@
+ resolveConflict::
+ Advice shown by various commands when conflicts
+ prevent the operation from being performed.
++ sequencerInUse::
++ Advice shown when a sequencer command is already in progress.
+ implicitIdentity::
+ Advice on how to set your identity configuration when
+ your information is guessed from the system username and
+
+ diff --git a/advice.c b/advice.c
+ --- a/advice.c
+ +++ b/advice.c
+@@
+ int advice_commit_before_merge = 1;
+ int advice_reset_quiet_warning = 1;
+ int advice_resolve_conflict = 1;
++int advice_sequencer_in_use = 1;
+ int advice_implicit_identity = 1;
+ int advice_detached_head = 1;
+ int advice_set_upstream_failure = 1;
+@@
+ { "commitBeforeMerge", &advice_commit_before_merge },
+ { "resetQuiet", &advice_reset_quiet_warning },
+ { "resolveConflict", &advice_resolve_conflict },
++ { "sequencerInUse", &advice_sequencer_in_use },
+ { "implicitIdentity", &advice_implicit_identity },
+ { "detachedHead", &advice_detached_head },
+ { "setupStreamFailure", &advice_set_upstream_failure },
+
+ diff --git a/advice.h b/advice.h
+ --- a/advice.h
+ +++ b/advice.h
+@@
+ extern int advice_commit_before_merge;
+ extern int advice_reset_quiet_warning;
+ extern int advice_resolve_conflict;
++extern int advice_sequencer_in_use;
+ extern int advice_implicit_identity;
+ extern int advice_detached_head;
+ extern int advice_set_upstream_failure;
+
diff --git a/sequencer.c b/sequencer.c
--- a/sequencer.c
+++ b/sequencer.c
3: b70299c572 ! 2: 189ef90318 sequencer: rename reset_for_rollback to reset_merge
@@ -6,7 +6,7 @@
achieve this, we could really make use of existing functions. reset_for_rollback is one such function, but the name does not intuitively suggest to use it to reset a merge, which it was born to
- perform see 539047c ("revert: introduce --abort to cancel a failed
+ perform, see 539047c ("revert: introduce --abort to cancel a failed
cherry-pick", 2011-11-23). Change the name to reset_merge to make it more intuitive.

4:  569122c861 = 3:  2b237e3174 sequencer: use argv_array in reset_merge
5:  4580f0e5af = 4:  5d64faf501 cherry-pick/revert: add --skip option
6:  f6f21b055b = 5:  807a344eb1 cherry-pick/revert: advise using --skip
Signature · 1 line
2.21.0