mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: Denton Liu <>
Cc: Git Mailing List <>
Subject: Re: [PATCH 1/2] completion: merge options for cherry-pick and revert
Date: Mon, 26 Aug 2019 09:59:56 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Denton Liu's message of "Sat, 24 Aug 2019 05:04:49 -0400")

Denton Liu <> writes:

> Since revert and cherry-pick share the same sequencer code, they should
> both accept the same command-line options. Merge the
> `__git_cherry_pick_inprogress_options` and
> `__git_revert_inprogress_options` variables together into
> `__git_cherry_pick_revert_inprogress_options` so that the options aren't
> unnecessarily duplicated twice.

Hmm, will the claim hold true in the future?  I do agree that they
will share continue, quit and abort (and skip) forever, but I am not
bold enough to declare that they will never have some unique option
in addition to the common one only because they "share the same
sequencer" machinery.  It is trivial to add a "if we are in revert,
do this" to the code, and it already works that way.

__git_sequencer_inprogress_common_options="--continue --quit --abort"

may be a bit more future-proof way, perhaps?  The places that use
the variable(s) already correctly distinguish cherry-pick and
revert, so even though the above and your version equally "unify"
the set of common options and allow adding a new common option
(i.e. skip) with equal ease, yours makes giving unique option to one
but not to the other more difficult.

  reply	other threads:[~2019-08-26 17:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-24  9:04 [PATCH 0/2] completion: complete --skip for cherry-pick and revert Denton Liu
2019-08-24  9:04 ` [PATCH 1/2] completion: merge options " Denton Liu
2019-08-26 16:59   ` Junio C Hamano [this message]
2019-08-24  9:04 ` [PATCH 2/2] completion: add --skip " Denton Liu
2019-08-27  4:45 ` [PATCH v2 0/3] advertise --skip for cherry-pick and revert better Denton Liu
2019-08-27  4:45   ` [PATCH v2 1/3] completion: merge options for cherry-pick and revert Denton Liu
2019-08-27  4:45   ` [PATCH v2 2/3] completion: add --skip " Denton Liu
2019-08-27  4:45   ` [PATCH v2 3/3] status: mention --skip for revert and cherry-pick Denton Liu
2019-08-27 21:56     ` Junio C Hamano
2019-08-27 23:18       ` Denton Liu
2019-08-28  2:47       ` Junio C Hamano
2019-08-28  6:45         ` Denton Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).