summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-09-22 22:35:11 -0400
committerKyle Meyer <kyle@kyleam.com>2021-09-23 22:07:44 -0400
commitb0d43bfd23d8f5f86db63d2409743398b08f9d4e (patch)
treef269e9d935d7038df9ca35a2b1a7dd8f69bbdb47
parent0ce70c3c72211106be19d48edc286a58721a8e03 (diff)
downloadpiem-b0d43bfd23d8f5f86db63d2409743398b08f9d4e.tar.gz
b4-am: Fill in more options
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. Message-Id: <20210923023511.269242-1-kyle@kyleam.com>
-rw-r--r--piem-b4.el38
1 files changed, 37 insertions, 1 deletions
diff --git a/piem-b4.el b/piem-b4.el
index 1b1b499..18a68d9 100644
--- a/piem-b4.el
+++ b/piem-b4.el
@@ -200,6 +200,29 @@ this triggers the creation of a new worktree."
: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 @@ this triggers the creation of a new worktree."
["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 @@ this triggers the creation of a new worktree."
(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)