From: Pieter Praet <pieter@praet.org>
To: Amit Kucheria <amit.kucheria@verdurent.com>, notmuch@notmuchmail.org
Subject: Re: Filtering out replies to a patch series
Date: Mon, 18 Apr 2011 08:57:07 +0200 [thread overview]
Message-ID: <87k4es9hdo.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <AANLkTinTezCRqQT=B567_A+dCJi7O_WFDmvYS7sdzjGk@mail.gmail.com>
On Fri, 1 Apr 2011 11:47:25 +0300, Amit Kucheria <amit.kucheria@verdurent.com> wrote:
> Hi,
>
> I am wondering how developers on this list handle the case of grabbing
> a patch series posted to the list and using something like git-am to
> apply it to their local trees.
See id:"m2vd3p3u78.fsf@kcals.maillard.im"
> Several patches in the series could have replies to them and hence
> they need to be filtered out.
>
> e.g. I use notmuch show --output=mbox thread:000000000000eb4e to get
> the basic series. But I'd appreciate any tips on filtering out the
> replies.
Something like this might work:
noreplieskthxbye() {
thread_id=${1}
target_dir=/tmp/${thread_id}
test -d ${target_dir} && echo "Patch queue dirty. Remove ${target_dir}" && return 1
mkdir -p ${target_dir}
notmuch show --format=mbox ${thread_id} | git mailsplit -o${target_dir}
grep -l "^diff --git" ${target_dir}/* | xargs git am -3
rm -rf ${target_dir} # "Danger, Will Robinson!"
}
noreplieskthxbye thread:000000000000eb4e
But I'd be suprised beyond belief if there weren't a *sane* way to do
this. I might also need some coffee first...
> Cheers,
> Amit
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
Peace
-Pieter
next prev parent reply other threads:[~2011-04-18 6:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 8:47 Filtering out replies to a patch series Amit Kucheria
2011-04-01 8:50 ` Amit Kucheria
2011-04-18 6:57 ` Pieter Praet [this message]
2011-04-19 9:16 ` Amit Kucheria
2011-04-25 21:02 ` Carl Worth
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://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k4es9hdo.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me \
--to=pieter@praet.org \
--cc=amit.kucheria@verdurent.com \
--cc=notmuch@notmuchmail.org \
/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://yhetil.org/notmuch.git/
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).