Re: [PATCH v3 01/20] cli: add stub for insert command
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 23 Jan 2013 08:26:31 +0000 (10:26 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:19 +0000 (09:53 -0800)
79/66c333b0ea03804f127e3c40f824df24bb4b6f [new file with mode: 0644]

diff --git a/79/66c333b0ea03804f127e3c40f824df24bb4b6f b/79/66c333b0ea03804f127e3c40f824df24bb4b6f
new file mode 100644 (file)
index 0000000..2432708
--- /dev/null
@@ -0,0 +1,78 @@
+Return-Path: <tomi.ollila@iki.fi>\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 8DCAF431FC0\r
+       for <notmuch@notmuchmail.org>; Wed, 23 Jan 2013 00:26:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 1WgUbHcXZRpP for <notmuch@notmuchmail.org>;\r
+       Wed, 23 Jan 2013 00:26:43 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5B163431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 23 Jan 2013 00:26:43 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id 41C2E100086;\r
+       Wed, 23 Jan 2013 10:26:31 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Peter Wang <novalazy@gmail.com>, Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH v3 01/20] cli: add stub for insert command\r
+In-Reply-To: <20130123190424.GA1980@hili.localdomain>\r
+References: <1358643004-14522-1-git-send-email-novalazy@gmail.com>\r
+       <1358643004-14522-2-git-send-email-novalazy@gmail.com>\r
+       <87vcaoj3i0.fsf@nikula.org>\r
+       <20130123190424.GA1980@hili.localdomain>\r
+User-Agent: Notmuch/0.15+11~ge1e719d (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 23 Jan 2013 10:26:31 +0200\r
+Message-ID: <m2y5fkz4nc.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Wed, 23 Jan 2013 08:26:47 -0000\r
+\r
+On Wed, Jan 23 2013, Peter Wang <novalazy@gmail.com> wrote:\r
+\r
+> On Tue, 22 Jan 2013 23:45:43 +0200, Jani Nikula <jani@nikula.org> wrote:\r
+>\r
+>> > +/* Copy the contents of standard input (fdin) into fdout. */\r
+>> > +static notmuch_bool_t\r
+>> > +copy_stdin (int fdin, int fdout)\r
+>> \r
+>> The comment and the function name imply the function has something to do\r
+>> with stdin, while it only cares about file descriptors.\r
+>\r
+> Tomi pointed out that the error message refers to standard input.\r
+\r
+Was that me or some other Tomi ;)... Nevertheless the function here called\r
+'copy_stdin' copies fdin to fdout, whatever the file descriptors are,\r
+it doesn't enforce fdin to be fd 0 (default stdin).\r
+I.e. the function name should be more generic (or then drop fdin argument --\r
+should better name then be 'copy_from_stdin' or copy_stdin_to.. or\r
+copy_[from_]stdin_to_some_magic_fd -- ok, no more bikeshedding now >;)).\r
+\r
+\r
+> Peter\r
+\r
+Tomi\r