unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Taylor Carpenter <taylor@codecafe.com>
To: Tomi Ollila <tomi.ollila@iki.fi>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] notmuch-mutt: replace gnu sed and xargs with perl
Date: Thu, 12 Apr 2012 13:29:59 -0500	[thread overview]
Message-ID: <CALeDOt960xJSmXuSgdG=ir4oPoQjF8fKBYRcTqFr3JQ0AJkO3Q@mail.gmail.com> (raw)
In-Reply-To: <m2r4vtjulx.fsf@guru.guru-group.fi>

On Thu, Apr 12, 2012 at 02:07, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Thu, Apr 12 2012, Taylor Carpenter wrote:
>
>> External software dependencies removed: sed and xargs.
>>
>> Sed shell escaping is handled automatically with perl symlink function.
>>
>> The xargs usage is specific to gnu xargs (fails on bsd xargs, etc).
>>
>> NOTE: The current query pulls the list of files into an array all at
>> once.  The larger the list the more memory used.
>> ---
> It is not too hard to read the filelist from pipe; Check the example
> I sent in id:"m2hawr4klm.fsf@guru.guru-group.fi"

Understood.


> Btw: what if there are same filenames in different directories that
> match. With basename there will be collision.

FYI, the current xargs version does not handle collisions either.

> Alternatives:
>
> * instead of basename convert '/':s to '_':s
> * take md5 or sha1 sum of the filename
> * take md5 or sha1 sum of dirname of the filename and concatenate...

How about pre-pending some unique text to the colliding file?

Regards,

Taylor

  reply	other threads:[~2012-04-12 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12  0:29 [PATCH] notmuch-mutt: replace gnu sed and xargs with perl Taylor Carpenter
2012-04-12  7:07 ` Tomi Ollila
2012-04-12 18:29   ` Taylor Carpenter [this message]
2012-04-12 18:49     ` Tomi Ollila

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='CALeDOt960xJSmXuSgdG=ir4oPoQjF8fKBYRcTqFr3JQ0AJkO3Q@mail.gmail.com' \
    --to=taylor@codecafe.com \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /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).