Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3CDE0431FB6 for ; Sun, 17 Apr 2011 23:57:14 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q9hfzuT1I3n0 for ; Sun, 17 Apr 2011 23:57:12 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3534E431FB5 for ; Sun, 17 Apr 2011 23:57:12 -0700 (PDT) Received: by wyi11 with SMTP id 11so5184731wyi.26 for ; Sun, 17 Apr 2011 23:57:11 -0700 (PDT) Received: by 10.216.143.7 with SMTP id k7mr4290187wej.95.1303109830831; Sun, 17 Apr 2011 23:57:10 -0700 (PDT) Received: from localhost (6.159-240-81.adsl-dyn.isp.belgacom.be [81.240.159.6]) by mx.google.com with ESMTPS id z50sm2406436weq.47.2011.04.17.23.57.08 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Apr 2011 23:57:09 -0700 (PDT) From: Pieter Praet To: Amit Kucheria , notmuch@notmuchmail.org Subject: Re: Filtering out replies to a patch series In-Reply-To: References: User-Agent: Notmuch/0.5-87-g30203d7 (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) Date: Mon, 18 Apr 2011 08:57:07 +0200 Message-ID: <87k4es9hdo.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 06:57:14 -0000 On Fri, 1 Apr 2011 11:47:25 +0300, Amit Kucheria 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