1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 4E104431FB6
\r
6 for <notmuch@notmuchmail.org>; Mon, 3 Dec 2012 12:56:21 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id OCb8haBKSgoX for <notmuch@notmuchmail.org>;
\r
16 Mon, 3 Dec 2012 12:56:20 -0800 (PST)
\r
17 Received: from mail-la0-f53.google.com (mail-la0-f53.google.com
\r
18 [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 90B1B431FAE
\r
21 for <notmuch@notmuchmail.org>; Mon, 3 Dec 2012 12:56:20 -0800 (PST)
\r
22 Received: by mail-la0-f53.google.com with SMTP id w12so2748670lag.26
\r
23 for <notmuch@notmuchmail.org>; Mon, 03 Dec 2012 12:56:19 -0800 (PST)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=google.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state;
\r
27 bh=AUVNq3LQXxCZtRRiYVvJmqpuaEbMUi4ekIb/3MZc9wQ=;
\r
28 b=QZVPXrB7owufqbJlf+TzBJJYmj13tFfPNPfxsK2QhIgyIhbDs7iqPWF+RlPktHOZhH
\r
29 v3UE0l5j/4NXuiuGvF68Qu8l9GM4dk1PW7sH0UFXw4cqL1dmK1XgJvBvcicvKKBtA9/F
\r
30 pVJ8CCvrHWIPsq3ZbSE8sSVZxUuIOVLUunTZdoZfnVmVeFT/EAO0iqt74/VlDKjj1NSE
\r
31 XDQWp+Z0OiUt2RfriEUvRh8jvnz7W8SlKtpdhH2TsFiRqNDDIsaw8++45CXDTLHhrv/E
\r
32 EjbBjksvcUuxzWN43iGbrJN+XkGxoUh2f75jfaYSopwzDWyTWSNuzR8yrAWRvR12G4x2
\r
34 Received: by 10.112.26.41 with SMTP id i9mr4851464lbg.77.1354568177631;
\r
35 Mon, 03 Dec 2012 12:56:17 -0800 (PST)
\r
36 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.
\r
38 by mx.google.com with ESMTPS id so7sm5830067lab.0.2012.12.03.12.56.15
\r
39 (version=SSLv3 cipher=OTHER); Mon, 03 Dec 2012 12:56:16 -0800 (PST)
\r
40 From: Jani Nikula <jani@nikula.org>
\r
41 To: notmuch@notmuchmail.org
\r
42 Subject: [PATCH 1/2] cli: fix notmuch top level argument parsing
\r
43 Date: Mon, 3 Dec 2012 22:56:12 +0200
\r
45 <c4f2a1048763950dd14e13c99a4e7eb333be8c9d.1354568072.git.jani@nikula.org>
\r
46 X-Mailer: git-send-email 1.7.10.4
\r
48 ALoCoQlfsS2BXKNUtlbAwKxHf5pklKelPCn3csemU0fJbTMe4jcFrzdPw6bja30aE9IebWUUw1m6
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Mon, 03 Dec 2012 20:56:21 -0000
\r
63 Use strcmp instead of STRNCMP_LITERAL, which matches the prefix
\r
64 instead of the whole argument.
\r
67 1 file changed, 2 insertions(+), 2 deletions(-)
\r
69 diff --git a/notmuch.c b/notmuch.c
\r
70 index 477a09c..4ff66e3 100644
\r
73 @@ -245,10 +245,10 @@ main (int argc, char *argv[])
\r
75 return notmuch (local);
\r
77 - if (STRNCMP_LITERAL (argv[1], "--help") == 0)
\r
78 + if (strcmp (argv[1], "--help") == 0)
\r
79 return notmuch_help_command (NULL, argc - 1, &argv[1]);
\r
81 - if (STRNCMP_LITERAL (argv[1], "--version") == 0) {
\r
82 + if (strcmp (argv[1], "--version") == 0) {
\r
83 printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n");
\r