~andir/nixpkgs-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 3

[PATCH ml-tools] notmuch-am: Add brief usage instructions

Details
Message ID
<7a2235715b2a43610a0a2bf70227813ac51dab54.1612868025.git.public@yoctocell.xyz>
DKIM signature
pass
Download raw message
Patch: +28 -5
Most people who haven't followed the messages in the nixpkgs-dev
mailing lists probably won't know how this was intended to be used.

Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
---
 notmuch-am | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/notmuch-am b/notmuch-am
index 3e0fe71..b3af007 100755
--- a/notmuch-am
+++ b/notmuch-am
@@ -1,7 +1,30 @@
#!/usr/bin/env bash

mbox=$(mktemp)
notmuch show --format=mbox "$1" > "$mbox"
msgid=$(grep -i ^message-id "$mbox" | cut -d" " -f2 | head -n1)
b4 am "$msgid" -m "$mbox"
rm -f "$mbox"
usage () {
    printf %s "\
Usage: notmuch-am <thread-id>

Use b4 to apply a patchset from a thread.

Example
  
  $ notmuch-am thread:000000000001b70e
  Analyzing 6 messages in the thread
  ---
  Writing ./20210206_jb55_b4_init_at_0_6_2.mbx
    [PATCH] b4: init at 0.6.2
      + Reviewed-by: Xinglu Chen <public@yoctocell.xyz> (✓ DKIM/yoctocell.xyz)
      + Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
"
exit 0
}

main () {
    mbox=$(mktemp)
    notmuch show --format=mbox "$1" > "$mbox"
    msgid=$(grep -i ^message-id "$mbox" | cut -d" " -f2 | head -n1)
    b4 am "$msgid" -m "$mbox"
    rm -f "$mbox"
}

[ -n "$1" ] || usage && main "$@"

base-commit: 3309cfeb79dc78b3a51498f673023d2b6a0e210e
-- 
2.30.0
Details
Message ID
<87a6sdqsni.fsf@jb55.com>
In-Reply-To
<7a2235715b2a43610a0a2bf70227813ac51dab54.1612868025.git.public@yoctocell.xyz> (view parent)
DKIM signature
missing
Download raw message
Thanks!

pushed

To http://git.jb55.com/nixpkgs-ml-tools
   3309cfe..fdc1835  master -> master
Details
Message ID
<20210209132849.oog7kpoboxcgh354@hoshi>
In-Reply-To
<7a2235715b2a43610a0a2bf70227813ac51dab54.1612868025.git.public@yoctocell.xyz> (view parent)
DKIM signature
missing
Download raw message
On 09-02-2021 11:55:15, Xinglu Chen wrote:
> Most people who haven't followed the messages in the nixpkgs-dev
> mailing lists probably won't know how this was intended to be used.

I like the idea, though I'd rather go for a --help or -h argument to get the
usage.

What do you think?
Either way...

Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
Details
Message ID
<20210209133029.5kqr2u534efnqtpx@hoshi>
In-Reply-To
<7a2235715b2a43610a0a2bf70227813ac51dab54.1612868025.git.public@yoctocell.xyz> (view parent)
DKIM signature
missing
Download raw message
Tested-by: Matthias Beyer <mail@beyermatthias.de>
Details
Message ID
<871rdps5qg.fsf@yoctocell.xyz>
In-Reply-To
<20210209132849.oog7kpoboxcgh354@hoshi> (view parent)
DKIM signature
pass
Download raw message
On Tue, Feb 09 2021, Matthias Beyer wrote:

> On 09-02-2021 11:55:15, Xinglu Chen wrote:
>> Most people who haven't followed the messages in the nixpkgs-dev
>> mailing lists probably won't know how this was intended to be used.
>
> I like the idea, though I'd rather go for a --help or -h argument to get the
> usage.
>
> What do you think?
> Either way...

That would work too. I didn't do that because the script doesn't take any
other options so it felt a bit unnecessary IMHO.
Reply to thread Export thread (mbox)