Re: [PATCH] notmuch-mutt: replace gnu sed and xargs with perl
authorTaylor Carpenter <taylor@codecafe.com>
Thu, 12 Apr 2012 18:29:59 +0000 (13:29 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:18 +0000 (09:46 -0800)
26/6ea40ba2cffc26bf009cd303e5609dabac3886 [new file with mode: 0644]

diff --git a/26/6ea40ba2cffc26bf009cd303e5609dabac3886 b/26/6ea40ba2cffc26bf009cd303e5609dabac3886
new file mode 100644 (file)
index 0000000..e60b4a0
--- /dev/null
@@ -0,0 +1,100 @@
+Return-Path: <taylor@codecafe.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4C77D431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 12 Apr 2012 11:30:44 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Ngynz5+ONt9Q for <notmuch@notmuchmail.org>;\r
+       Thu, 12 Apr 2012 11:30:42 -0700 (PDT)\r
+Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com\r
+ [74.125.82.41])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 13230431FAE   for <notmuch@notmuchmail.org>; Thu, 12 Apr 2012 11:30:41 -0700\r
+ (PDT)\r
+Received: by wgbds1 with SMTP id ds1so5396037wgb.2\r
+       for <notmuch@notmuchmail.org>; Thu, 12 Apr 2012 11:30:39 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=mime-version:in-reply-to:references:from:date:message-id:subject:to\r
+       :cc:content-type:content-transfer-encoding:x-gm-message-state;\r
+       bh=WJEeH6tpJrhy9ZxXwlPV4GqZkQ9/rWkxesWyE2j4z4g=;\r
+       b=RCmUW7v3jSL/OY52x/qEUGG8O0IJdClmGpRSpuodInUz/mhAsP7x72+glTIVZ899gd\r
+       9rL7E0wzvGBpdyWB328MrO+ecQmnFdNjdrFL1tgXlbtkeoOPlLr2Mh2t93bW7Oy3yA1y\r
+       nUJvJJp4JG3OMCkhsFwfVFucB/Y6Hf50UaZm1c30U1GKtMOdaqgjmjuycHq23pvsPigm\r
+       vwXETmvhZWvd8VVAJv4qziHVrPR68bYrvvH0hf5aaqDb11CMwp8zI36027p0ICu0MxMT\r
+       t7kWIsRgiGTX0RyqkdMAVEP3bkMjPG1SVbReRl6cUR2/+KKadzb2csW23vj+CS+WjNiV\r
+       Pq1A==\r
+Received: by 10.180.98.8 with SMTP id ee8mr8297279wib.14.1334255439485; Thu,\r
+       12 Apr 2012 11:30:39 -0700 (PDT)\r
+MIME-Version: 1.0\r
+Received: by 10.216.85.144 with HTTP; Thu, 12 Apr 2012 11:29:59 -0700 (PDT)\r
+In-Reply-To: <m2r4vtjulx.fsf@guru.guru-group.fi>\r
+References: <20120412002953.GA27056@codecafe.com>\r
+       <m2r4vtjulx.fsf@guru.guru-group.fi>\r
+From: Taylor Carpenter <taylor@codecafe.com>\r
+Date: Thu, 12 Apr 2012 13:29:59 -0500\r
+Message-ID:\r
+ <CALeDOt960xJSmXuSgdG=ir4oPoQjF8fKBYRcTqFr3JQ0AJkO3Q@mail.gmail.com>\r
+Subject: Re: [PATCH] notmuch-mutt: replace gnu sed and xargs with perl\r
+To: Tomi Ollila <tomi.ollila@iki.fi>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQkkjiG9WLCMhpLl/hhwU6ZaIR3OYTrmDVaSKiEitcghJIRhFO+y0SyRA1tjkT+vfWY6ohh8\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 12 Apr 2012 18:30:44 -0000\r
+\r
+On Thu, Apr 12, 2012 at 02:07, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> On Thu, Apr 12 2012, Taylor Carpenter wrote:\r
+>\r
+>> External software dependencies removed: sed and xargs.\r
+>>\r
+>> Sed shell escaping is handled automatically with perl symlink function.\r
+>>\r
+>> The xargs usage is specific to gnu xargs (fails on bsd xargs, etc).\r
+>>\r
+>> NOTE: The current query pulls the list of files into an array all at\r
+>> once. =A0The larger the list the more memory used.\r
+>> ---\r
+> It is not too hard to read the filelist from pipe; Check the example\r
+> I sent in id:"m2hawr4klm.fsf@guru.guru-group.fi"\r
+\r
+Understood.\r
+\r
+\r
+> Btw: what if there are same filenames in different directories that\r
+> match. With basename there will be collision.\r
+\r
+FYI, the current xargs version does not handle collisions either.\r
+\r
+> Alternatives:\r
+>\r
+> * instead of basename convert '/':s to '_':s\r
+> * take md5 or sha1 sum of the filename\r
+> * take md5 or sha1 sum of dirname of the filename and concatenate...\r
+\r
+How about pre-pending some unique text to the colliding file?\r
+\r
+Regards,\r
+\r
+Taylor\r