From: david@tethera.net
To: notmuch@notmuchmail.org
Cc: David Bremner <bremner@debian.org>
Subject: [PATCH 2/2] notmuch-restore: replace positional argument for input with option
Date: Fri, 3 Aug 2012 23:23:12 -0300 [thread overview]
Message-ID: <1344046992-25976-3-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1344046992-25976-1-git-send-email-david@tethera.net>
From: David Bremner <bremner@debian.org>
Since notmuch dump doesn't use positional arguments anymore, it seems
better to be consistent.
---
man/man1/notmuch-restore.1 | 2 +-
notmuch-restore.c | 2 +-
test/dump-restore | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/man/man1/notmuch-restore.1 b/man/man1/notmuch-restore.1
index 18281c7..d0d50dd 100644
--- a/man/man1/notmuch-restore.1
+++ b/man/man1/notmuch-restore.1
@@ -6,7 +6,7 @@ notmuch-restore \- restores the tags from the given file (see notmuch dump)
.B "notmuch restore"
.RB [ "--accumulate" ]
-.RI "[ <" filename "> ]"
+.RI "[ --input=<" filename "> ]"
.SH DESCRIPTION
diff --git a/notmuch-restore.c b/notmuch-restore.c
index 4f4096e..08d5adc 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -122,7 +122,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config);
notmuch_opt_desc_t options[] = {
- { NOTMUCH_OPT_POSITION, &input_file_name, 0, 0, 0 },
+ { NOTMUCH_OPT_STRING, &input_file_name, "input", 'i', 0 },
{ NOTMUCH_OPT_BOOLEAN, &accumulate, "accumulate", 'a', 0 },
{ 0, 0, 0, 0, 0 }
};
diff --git a/test/dump-restore b/test/dump-restore
index c7801cf..f25f7cf 100755
--- a/test/dump-restore
+++ b/test/dump-restore
@@ -19,7 +19,7 @@ test_expect_success 'Dumping all tags II' \
test_expect_success 'Clearing all tags' \
'sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected &&
- notmuch restore clear.expected &&
+ notmuch restore --input=clear.expected &&
notmuch dump > clear.actual &&
test_cmp clear.expected clear.actual'
@@ -30,7 +30,7 @@ test_expect_success 'Accumulate original tags' \
test_cmp dump-ABC_DEF.expected dump.actual'
test_expect_success 'Restoring original tags' \
- 'notmuch restore dump.expected &&
+ 'notmuch restore --input=dump.expected &&
notmuch dump > dump.actual &&
test_cmp dump.expected dump.actual'
@@ -40,7 +40,7 @@ test_expect_success 'Restore with nothing to do' \
test_cmp dump.expected dump.actual'
test_expect_success 'Restore with nothing to do, II' \
- 'notmuch restore --accumulate dump.expected &&
+ 'notmuch restore --accumulate --input=dump.expected &&
notmuch dump > dump.actual &&
test_cmp dump.expected dump.actual'
@@ -51,7 +51,7 @@ test_expect_success 'Restore with nothing to do, III' \
# notmuch restore currently only considers the first argument.
test_expect_success 'Invalid restore invocation' \
- 'test_must_fail notmuch restore dump.expected another_one'
+ 'test_must_fail notmuch restore --input=dump.expected another_one'
test_begin_subtest "dump --output=outfile"
notmuch dump --output=dump-outfile.actual
--
1.7.10.4
next prev parent reply other threads:[~2012-08-04 2:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-04 2:23 Remove positional arguments to dump and restore david
2012-08-04 2:23 ` [PATCH 1/2] notmuch-dump: remove deprecated positional argument for output file david
2012-08-06 12:09 ` David Bremner
2012-08-04 2:23 ` david [this message]
2012-08-04 12:55 ` [PATCH v2] notmuch-restore: replace positional argument for input with option David Bremner
2012-08-05 15:05 ` [PATCH] NEWS: discuss changes for dump and restore syntax david
2012-08-04 18:14 ` Remove positional arguments to dump and restore Jameson Graef Rollins
2012-08-04 23:20 ` Tomi Ollila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344046992-25976-3-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=bremner@debian.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).