--- /dev/null
+Return-Path: <jani@nikula.org>\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 45411429E21\r
+ for <notmuch@notmuchmail.org>; Mon, 3 Jun 2013 00:16:11 -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 vyOcMxVOHybI for <notmuch@notmuchmail.org>;\r
+ Mon, 3 Jun 2013 00:15:59 -0700 (PDT)\r
+Received: from mail-we0-f174.google.com (mail-we0-f174.google.com\r
+ [74.125.82.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 0721D421180\r
+ for <notmuch@notmuchmail.org>; Mon, 3 Jun 2013 00:15:58 -0700 (PDT)\r
+Received: by mail-we0-f174.google.com with SMTP id q58so1357211wes.5\r
+ for <notmuch@notmuchmail.org>; Mon, 03 Jun 2013 00:15:56 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+ :message-id:mime-version:content-type:x-gm-message-state;\r
+ bh=2CzrHMnjrrzerHmF3PlDYsqx/St92vkOVYc1BqLryDM=;\r
+ b=RMAvNGVC44tV78vrivmad7upt04grxnLmtRQvrfAmQjKwFDKtfU5itQcPC8kKSaZoS\r
+ cBLngsMe+JrGjNIBKpcjsHfu0tO87WcoyKYhW8knhL4icXwDKUT+nYiIwqVsRFYT1sJS\r
+ pDrglC25TUVW2KC6kzhFDdH7Fo/XAxX6G/g0tbJaF35fxrCf+g16dso6mP+HNjcJ2ToA\r
+ sh0VIaNXsoX42O7PVTxpKylp3eYsVuonl9Xi7z2f94alNj8bV0My5RoxNZdXKyNuGXeC\r
+ Kfj0TTS6Ui6T1HgvD32gVhZVIolH8xr9l9eY+vWML8S4V97ObB67jGl/zQyDYmKj6mLj\r
+ ShyQ==\r
+X-Received: by 10.180.11.206 with SMTP id s14mr11027210wib.40.1370243754079;\r
+ Mon, 03 Jun 2013 00:15:54 -0700 (PDT)\r
+Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
+ by mx.google.com with ESMTPSA id\r
+ fx7sm21268524wic.11.2013.06.03.00.15.52 for <multiple recipients>\r
+ (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
+ Mon, 03 Jun 2013 00:15:53 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [RFC PATCH] revert: Removed top level --stderr= option\r
+In-Reply-To: <1370027431-16018-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1370027431-16018-1-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.15.2+128~g80473f0 (http://notmuchmail.org) Emacs/23.2.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 03 Jun 2013 09:15:49 +0200\r
+Message-ID: <87k3mb1x7e.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQnEsZLIxKKJZF7b8azJc8d9+rkZvFfaUk6HWb64ADWNHtM/OrJWh10nMzk5EeNuX89ammt8\r
+Cc: tomi.ollila@iki.fi\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: Mon, 03 Jun 2013 07:16:11 -0000\r
+\r
+On Fri, 31 May 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> While looked good on paper, its attempted use caused confusion, complexity,\r
+> and potential for information leak when passed through wrapper scripts.\r
+> For slimmer code and to lessen demand for maintenance/support the set of\r
+> commits which added top level --stderr= option is now reverted.\r
+> ---\r
+>\r
+> Change was easy, commit message hard. Opinions? Revert is easiest to do now.\r
+> Also, if someone comes with a novel idea how to utilize --stderr option\r
+> please tell it now -- I'd be most eager to hear it :D\r
+>\r
+>\r
+> This change was done the following way:\r
+>\r
+> $ git checkout -b rvrt b9020448bd\r
+> $ git reset --hard HEAD^^^^\r
+> $ git reset b9020448bd\r
+> $ git commit -a\r
+> $ git diff HEAD~5..HEAD\r
+\r
+Protip ;)\r
+\r
+$ git revert -n b9020448bd^^^^..b9020448bd\r
+$ git commit\r
+\r
+BR,\r
+Jani.\r
+\r
+>\r
+> (last one to reveal HEAD~5 & HEAD have identical trees).\r
+>\r
+> Question why:\r
+> id:20130521195549.6550.53636@thinkbox.jade-hamburg.de\r
+>\r
+> Good reason why not:\r
+> id:1369934016-22308-1-git-send-email-amdragon@mit.edu\r
+>\r
+>\r
+> NEWS | 5 -----\r
+> man/man1/notmuch.1 | 7 -------\r
+> notmuch-client.h | 1 -\r
+> notmuch.c | 32 --------------------------------\r
+> test/help-test | 9 ---------\r
+> 5 files changed, 54 deletions(-)\r
+>\r
+> diff --git a/NEWS b/NEWS\r
+> index 80abd97..a7f2ec6 100644\r
+> --- a/NEWS\r
+> +++ b/NEWS\r
+> @@ -35,11 +35,6 @@ Top level option to specify configuration file\r
+> It's now possible to specify the configuration file to use on the\r
+> command line using the `notmuch --config=FILE` option.\r
+> \r
+> -Top level option to redirect writes to stderr\r
+> -\r
+> - With `notmuch --stderr=FILE` all writes to stderr are redirected to\r
+> - the specified file. If FILE is '-', stderr is redirected to stdout.\r
+> -\r
+> Deprecated commands "part" and "search-tags" are removed.\r
+> \r
+> Bash command-line completion\r
+> diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1\r
+> index f5ca0ad..033cc10 100644\r
+> --- a/man/man1/notmuch.1\r
+> +++ b/man/man1/notmuch.1\r
+> @@ -76,14 +76,7 @@ Print the installed version of notmuch, and exit.\r
+> \r
+> Specify the configuration file to use. This overrides any\r
+> configuration file specified by ${NOTMUCH_CONFIG}.\r
+> -.RE\r
+> -\r
+> -.RS 4\r
+> -.TP 4\r
+> -.B \-\-stderr=FILE\r
+> \r
+> -Redirect all writes to stderr to the specified file.\r
+> -If FILE is '-', stderr is redirected to stdout.\r
+> .RE\r
+> \r
+> .SH COMMANDS\r
+> diff --git a/notmuch-client.h b/notmuch-client.h\r
+> index 4a3c7ac..45749a6 100644\r
+> --- a/notmuch-client.h\r
+> +++ b/notmuch-client.h\r
+> @@ -54,7 +54,6 @@ typedef GMimeCipherContext notmuch_crypto_context_t;\r
+> #include <sys/stat.h>\r
+> #include <sys/time.h>\r
+> #include <unistd.h>\r
+> -#include <fcntl.h>\r
+> #include <dirent.h>\r
+> #include <errno.h>\r
+> #include <signal.h>\r
+> diff --git a/notmuch.c b/notmuch.c\r
+> index 15e90c8..f51a84f 100644\r
+> --- a/notmuch.c\r
+> +++ b/notmuch.c\r
+> @@ -251,32 +251,6 @@ notmuch_command (notmuch_config_t *config,\r
+> return 0;\r
+> }\r
+> \r
+> -static int\r
+> -redirect_stderr (const char * stderr_file)\r
+> -{\r
+> - if (strcmp (stderr_file, "-") == 0) {\r
+> - if (dup2 (STDOUT_FILENO, STDERR_FILENO) < 0) {\r
+> - perror ("dup2");\r
+> - return 1;\r
+> - }\r
+> - } else {\r
+> - int fd = open (stderr_file, O_WRONLY|O_CREAT|O_TRUNC, 0666);\r
+> - if (fd < 0) {\r
+> - fprintf (stderr, "Error: Cannot redirect stderr to '%s': %s\n",\r
+> - stderr_file, strerror (errno));\r
+> - return 1;\r
+> - }\r
+> - if (fd != STDERR_FILENO) {\r
+> - if (dup2 (fd, STDERR_FILENO) < 0) {\r
+> - perror ("dup2");\r
+> - return 1;\r
+> - }\r
+> - close (fd);\r
+> - }\r
+> - }\r
+> - return 0;\r
+> -}\r
+> -\r
+> int\r
+> main (int argc, char *argv[])\r
+> {\r
+> @@ -285,7 +259,6 @@ main (int argc, char *argv[])\r
+> const char *command_name = NULL;\r
+> command_t *command;\r
+> char *config_file_name = NULL;\r
+> - char *stderr_file = NULL;\r
+> notmuch_config_t *config;\r
+> notmuch_bool_t print_help=FALSE, print_version=FALSE;\r
+> int opt_index;\r
+> @@ -295,7 +268,6 @@ main (int argc, char *argv[])\r
+> { NOTMUCH_OPT_BOOLEAN, &print_help, "help", 'h', 0 },\r
+> { NOTMUCH_OPT_BOOLEAN, &print_version, "version", 'v', 0 },\r
+> { NOTMUCH_OPT_STRING, &config_file_name, "config", 'c', 0 },\r
+> - { NOTMUCH_OPT_STRING, &stderr_file, "stderr", '\0', 0 },\r
+> { 0, 0, 0, 0, 0 }\r
+> };\r
+> \r
+> @@ -315,10 +287,6 @@ main (int argc, char *argv[])\r
+> return 1;\r
+> }\r
+> \r
+> - if (stderr_file && redirect_stderr (stderr_file) != 0) {\r
+> - /* error already printed */\r
+> - return 1;\r
+> - }\r
+> if (print_help)\r
+> return notmuch_help_command (NULL, argc - 1, &argv[1]);\r
+> \r
+> diff --git a/test/help-test b/test/help-test\r
+> index bd0111c..f7df725 100755\r
+> --- a/test/help-test\r
+> +++ b/test/help-test\r
+> @@ -9,13 +9,4 @@ test_expect_success 'notmuch help' 'notmuch help'\r
+> test_expect_success 'notmuch help tag' 'notmuch help tag'\r
+> test_expect_success 'notmuch --version' 'notmuch --version'\r
+> \r
+> -test_begin_subtest "notmuch --stderr=stderr help %"\r
+> -notmuch --stderr=stderr help %\r
+> -test_expect_equal "$(cat stderr)" "\r
+> -Sorry, % is not a known command. There's not much I can do to help."\r
+> -\r
+> -test_begin_subtest "notmuch --stderr=- help %"\r
+> -test_expect_equal "$(notmuch --stderr=- help %)" "\r
+> -Sorry, % is not a known command. There's not much I can do to help."\r
+> -\r
+> test_done\r
+> -- \r
+> 1.8.0\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r