[PATCH v2] nmbug: Add an 'init' command
W. Trevor King
wking at tremily.us
Sat Oct 11 00:10:00 PDT 2014
On Sat, Oct 11, 2014 at 09:02:20AM +0200, David Bremner wrote:
> W. Trevor King writes:
> > On Sat, Oct 11, 2014 at 06:53:11AM +0200, David Bremner wrote:
> >> W. Trevor King writes:
> >> > but I expect that closing stdin is more portable than the
> >> > /dev/null path.
> >>
> >> /dev/null is part of POSIX
> >
> > Maybe folks want to use nmbug on Windows or some other crazy
> > non-POSIX OS? I don't know how Windows-compatible the rest of
> > notmuch is (it looks like Xapian can be built with MSYS+mingw or
> > MSVC [1,2]), and I don't think supporting non-POSIX OSes is worth
> > a lot of effort, but using stdin instead here is easy ;).
>
> I have no objection to the code, but I think the comment about
> portability just causes confusion. As witnessed by this discussion.
I wanted to explain why I wasn't using /dev/null, especially since
that's what the Perl version used and that phrasing is preserved in
the current comment:
# magic hash for Git (git hash-object -t blob /dev/null)
_EMPTYBLOB = 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'
So how should I more clearly explain why I prefer stdin to /dev/null?
Maybe “… is more portable than the /dev/null path (which doesn't exist
on Windows, for example).”?
Cheers,
Trevor
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20141011/53b52e07/attachment.pgp>
More information about the notmuch
mailing list