From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:267::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id ts8PNunnS2FBVAAAsNZ9tg (envelope-from ); Thu, 23 Sep 2021 02:35:21 +0000 Received: from out0.migadu.com ([2001:41d0:2:267::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6ERbMennS2GxWQAAB5/wlQ (envelope-from ); Thu, 23 Sep 2021 02:35:21 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1632364521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=P6RlG/SvJADP/+TKL+WWCBq7okhRCMmj3iiMsHY6wJw=; b=Qfb4uQ7s4MLtfCcGuxEgOvege/wcgie03NE4fb3Bo3dUxiY5A0KDpn4SaKWsvtdr5Amev3 CDNe8L2r2MBrV8f7x+7n1RCdl+k/iA4NcyLWzaKbQjoYGaJEn64rI1PlzxhRjtCPTZbtI4 wjodpKZ+mNfC6O9ToJha7mgyjEp5jcFjx6MFf+Q88MdwGps99AjzixXWHr0i9CoNqnO7BW f6F2yx+1E3lzhRh0bc+uwsmaZ2XveItfOPUkg6kr88FUmnZJ5lkn2k5QpouHrWOnGfwGfN zvBYrDgnPsA8XoBBDtG1UqUQ7rfHKsNjzlTYrMLPNrDp6PGJuofpxrdwoXaRng== From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [PATCH] b4-am: Fill in more options Date: Wed, 22 Sep 2021 22:35:11 -0400 Message-Id: <20210923023511.269242-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyle@kyleam.com X-TUID: lqj+z4QJCl44 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