[PATCH 6/6] cli: add top level --config=FILE option
authorJani Nikula <jani@nikula.org>
Tue, 29 Jan 2013 21:46:24 +0000 (23:46 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:26 +0000 (09:53 -0800)
5b/96e1eb6851192f5a92fd857c7ae07f2e405157 [new file with mode: 0644]

diff --git a/5b/96e1eb6851192f5a92fd857c7ae07f2e405157 b/5b/96e1eb6851192f5a92fd857c7ae07f2e405157
new file mode 100644 (file)
index 0000000..9f5348f
--- /dev/null
@@ -0,0 +1,106 @@
+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 C1DB9431FC2\r
+       for <notmuch@notmuchmail.org>; Tue, 29 Jan 2013 13:47:08 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\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 p8P25tJoGZBy for <notmuch@notmuchmail.org>;\r
+       Tue, 29 Jan 2013 13:47:08 -0800 (PST)\r
+Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com\r
+       [209.85.217.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0E409431FC3\r
+       for <notmuch@notmuchmail.org>; Tue, 29 Jan 2013 13:47:03 -0800 (PST)\r
+Received: by mail-lb0-f175.google.com with SMTP id n3so1311291lbo.6\r
+       for <notmuch@notmuchmail.org>; Tue, 29 Jan 2013 13:47:02 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-received:from:to:subject:date:message-id:x-mailer:in-reply-to\r
+       :references:in-reply-to:references:x-gm-message-state;\r
+       bh=zuQO6SOA1CaSVBBXUG/vfJuuMXcuewvzBJ9xEY6kTSU=;\r
+       b=mRUdgbSA7C8pIr10ekj7Ncc69cUfOQWsxsa2kaKNIGhhzH8NxTQCFCQmjBTowJpUl+\r
+       ltuLvh+4ojqC2HrjItcS9Z16EhtFI+IMcn2aLldD/s5dl7hE8i/tr+CvZCS5MMC7BzVo\r
+       ksHFTBRadwhwz/RE7SymeM3hVV/9PGoyE1YIcP/UbeoCrljCFwsudlzq5/+F63yf7boh\r
+       YsCkOopyeuM1U7naOTQ+0u+WIdK5QamqT4YtYzpSYP19nyl66H9aYXYbDhJMhKKpeZsP\r
+       8+dIuDb+sOfsIu+iDSWb8AihfrwhG2Ki0GwW3xRhcmAT8I8r9kASqRkQSJApuQTlf1RJ\r
+       Xgyg==\r
+X-Received: by 10.152.147.36 with SMTP id th4mr2522667lab.19.1359496022562;\r
+       Tue, 29 Jan 2013 13:47:02 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id f2sm5596970lbz.4.2013.01.29.13.47.00\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Tue, 29 Jan 2013 13:47:01 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 6/6] cli: add top level --config=FILE option\r
+Date: Tue, 29 Jan 2013 23:46:24 +0200\r
+Message-Id:\r
+ <231895226338fb6b24eea0ffeef565992822aca8.1359495450.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <cover.1359495450.git.jani@nikula.org>\r
+References: <cover.1359495450.git.jani@nikula.org>\r
+In-Reply-To: <cover.1359495450.git.jani@nikula.org>\r
+References: <cover.1359495450.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQl7pwOxno2S+5esqZEpsNTukxhBc9IL46J4B7LFZmood7UmtqTF+GxsuvumLAkFeq26ASML\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: Tue, 29 Jan 2013 21:47:09 -0000\r
+\r
+Let the user specify the config file on the command line.\r
+---\r
+ notmuch.c |    4 +++-\r
+ 1 file changed, 3 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/notmuch.c b/notmuch.c\r
+index f4bfeaa..71cd0d6 100644\r
+--- a/notmuch.c\r
++++ b/notmuch.c\r
+@@ -258,6 +258,7 @@ main (int argc, char *argv[])\r
+     char *talloc_report;\r
+     const char *command_name = NULL;\r
+     command_t *command;\r
++    char *config_file_name = NULL;\r
+     notmuch_config_t *config;\r
+     notmuch_bool_t print_help=FALSE, print_version=FALSE;\r
+     int opt_index;\r
+@@ -266,6 +267,7 @@ main (int argc, char *argv[])\r
+     notmuch_opt_desc_t options[] = {\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
+       { 0, 0, 0, 0, 0 }\r
+     };\r
\r
+@@ -303,7 +305,7 @@ main (int argc, char *argv[])\r
+       return 1;\r
+     }\r
\r
+-    config = notmuch_config_open (local, NULL, command->create_config);\r
++    config = notmuch_config_open (local, config_file_name, command->create_config);\r
+     if (!config)\r
+       return 1;\r
\r
+-- \r
+1.7.10.4\r
+\r