discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: piem@inbox.kyleam.com
Subject: [PATCH] b4-am: Fill in more options
Date: Wed, 22 Sep 2021 22:35:11 -0400	[thread overview]
Message-ID: <20210923023511.269242-1-kyle@kyleam.com> (raw)

Catch up with some new options and add some older ones that I punted
on earlier.  This should cover everything that's in b4 v0.8, hiding
things that are a bit too lore-specific or tailored to command-line
operation.
---
 piem-b4.el | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/piem-b4.el b/piem-b4.el
index 1b1b499c..18a68d95 100644
--- a/piem-b4.el
+++ b/piem-b4.el
@@ -200,6 +200,29 @@ (transient-define-argument piem-b4-am:--cherry-pick ()
   :argument "--cherry-pick="
   :reader #'read-string)
 
+(transient-define-argument piem-b4-am:--use-project ()
+  :description "Use a specific lore project instead of guessing"
+  :class 'transient-option
+  :shortarg "-p"
+  :argument "--use-project="
+  :level 7
+  :reader #'read-string)
+
+(transient-define-argument piem-b4-am:--guess-branch ()
+  :description "Restrict base guess to this branch"
+  :class 'transient-option
+  :shortarg "-b"
+  :argument "--guess-branch="
+  ;; TODO: Optionally support `magit-read-branch'.
+  :reader #'read-string)
+
+(transient-define-argument piem-b4-am:--guess-lookback ()
+  :description "How many days to go back when guessing base"
+  :class 'transient-option
+  :shortarg "-G"
+  :argument "--guess-lookback="
+  :reader #'transient-read-number-N+)
+
 ;;;###autoload (autoload 'piem-b4-am "piem-b4" nil t)
 (transient-define-prefix piem-b4-am ()
   "Filter mbox to patches and feed to git-am"
@@ -207,6 +230,9 @@ (transient-define-prefix piem-b4-am ()
   ["General options"
    ("-c" "Check newer versions" "--check-newer-revisions")
    ("-C" "Don't use local cache" "--no-cache")
+   ;; Hide by default because it hard codes the URL.
+   (7 "-l" "Add a lore.kernel.org/r/ to patches" "--add-link")
+   ("-L" "Do not reroll partial series" "--no-partial-reroll")
    ("-s" "Add my signed-off-by" "--add-my-sob")
    ("-S" "Apply trailers without checking email addresses" "--sloppy-trailers")
    ("-t" "Apply cover letter trailers" "--apply-cover-trailers")
@@ -214,8 +240,18 @@ (transient-define-prefix piem-b4-am ()
    (piem-b4-am:--use-version)
    (piem-b4-am:--cherry-pick)]
   ["Options for creating am-ready mboxes"
+   ("-3" "Prepare for 3-way merge" "--prep-3way")
+   ("-g" "Try to guess base" "--guess-base")
+   (piem-b4-am:--guess-branch)
+   (piem-b4-am:--guess-lookback)
+   (piem-b4-am:--use-project)
    (piem-b4-am:--outdir)
-   (piem-b4-am:--mbox-name)]
+   (piem-b4-am:--mbox-name)
+   ("-M" "Save as maildir" "--save-as-maildir")
+   (7 "-Q" "Save as quilt-read folder" "--quilt-ready")
+   ;; Hide because this is unlikely to be useful outside of
+   ;; command-line piping to `git am'.
+   (5 "-V" "Do not save cover letter" "--no-cover")]
   ["Actions"
    [("a" "Message ID -> mbox -> git-am" piem-b4-am-from-mid)]
    [("b" "Local mbox -> am-ready mbox" piem-b4-am-ready-from-mbox)

base-commit: c901d3ec025773c8eae04257099fcdfe704085ac
-- 
2.33.0


             reply	other threads:[~2021-09-23  2:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23  2:35 Kyle Meyer [this message]
2021-09-23  2:43 ` [PATCH] b4-am: Fill in more options Kyle Meyer

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://git.kyleam.com/

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

  git send-email \
    --in-reply-to=20210923023511.269242-1-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.kyleam.com/piem/

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).