[GSoC][PATCH v6 0/5] Teach cherry-pick/revert to skip commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've covered the advice message behind `advice_resolve_conflict` variable and
changed the order of error and advice to match that of 1/5. I believe that we
don't have any advice variable appropriate for advice in 1/5.

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/git-cherry-pick.txt |   4 +-
 Documentation/git-revert.txt      |   4 +-
 Documentation/sequencer.txt       |   4 +
 builtin/commit.c                  |  13 +--
 builtin/revert.c                  |   5 ++
 sequencer.c                       | 135 ++++++++++++++++++++++++++----
 sequencer.h                       |   1 +
 t/t3510-cherry-pick-sequence.sh   | 122 +++++++++++++++++++++++++++
 8 files changed, 262 insertions(+), 26 deletions(-)

Range-diff:
1:  825486c22d ! 1:  2b16d7ea4d cherry-pick/revert: add --skip option
    @@ -168,10 +168,14 @@
     +	return sequencer_continue(r, opts);
     +
     +give_advice:
    -+	advise(_("have you committed already?\n"
    -+		 "try \"git %s --continue\""),
    -+		 action == REPLAY_REVERT ? "revert" : "cherry-pick");
    -+	return error(_("there is nothing to skip"));
    ++	error(_("there is nothing to skip"));
    ++
    ++	if (advice_resolve_conflict) {
    ++		advise(_("have you committed already?\n"
    ++			 "try \"git %s --continue\""),
    ++			 action == REPLAY_REVERT ? "revert" : "cherry-pick");
    ++	}
    ++	return -1;
     +}
     +
      static int save_todo(struct todo_list *todo_list, struct replay_opts *opts)
    @@ -263,9 +267,9 @@
     +test_expect_success 'check advice when we move HEAD by committing' '
     +	pristine_detach initial &&
     +	cat >expect <<-EOF &&
    ++	error: there is nothing to skip
     +	hint: have you committed already?
     +	hint: try "git cherry-pick --continue"
    -+	error: there is nothing to skip
     +	fatal: cherry-pick failed
     +	EOF
     +	test_must_fail git cherry-pick base..yetanotherpick &&
2:  63dbc11ab1 = 2:  8f278b5139 cherry-pick/revert: advise using --skip
-- 
2.21.0




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux