* simple fixes for notmuch-restore
@ 2012-11-15 2:42 david
2012-11-15 2:42 ` [PATCH 1/2] notmuch-restore: remove extra increment of optind david
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: david @ 2012-11-15 2:42 UTC (permalink / raw)
To: notmuch
Here are a couple of small fixes I noticed while working on notmuch-restore.
I think the optind increment is harmless (although confusing) and the
other is just correcting an error message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] notmuch-restore: remove extra increment of optind
2012-11-15 2:42 simple fixes for notmuch-restore david
@ 2012-11-15 2:42 ` david
2012-11-15 2:42 ` [PATCH 2/2] notmuch-restore: fix error message for extra positional parameter david
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: david @ 2012-11-15 2:42 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner
From: David Bremner <bremner@debian.org>
This is left over from when the file name was a positional parameter.
---
notmuch-restore.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/notmuch-restore.c b/notmuch-restore.c
index 08d5adc..09dd691 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -141,7 +141,6 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
input_file_name, strerror (errno));
return 1;
}
- optind++;
}
if (opt_index < argc) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] notmuch-restore: fix error message for extra positional parameter.
2012-11-15 2:42 simple fixes for notmuch-restore david
2012-11-15 2:42 ` [PATCH 1/2] notmuch-restore: remove extra increment of optind david
@ 2012-11-15 2:42 ` david
2012-11-15 15:23 ` simple fixes for notmuch-restore Tomi Ollila
2012-11-15 22:25 ` David Bremner
3 siblings, 0 replies; 5+ messages in thread
From: david @ 2012-11-15 2:42 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner
From: David Bremner <bremner@debian.org>
Note that a single positional parameter will take this code path also,
so the old message really makes no sense anymore.
---
notmuch-restore.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/notmuch-restore.c b/notmuch-restore.c
index 09dd691..7d8f44c 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -145,8 +145,8 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
if (opt_index < argc) {
fprintf (stderr,
- "Cannot read dump from more than one file: %s\n",
- argv[optind]);
+ "Unused positional parameter: %s\n",
+ argv[opt_index]);
return 1;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: simple fixes for notmuch-restore
2012-11-15 2:42 simple fixes for notmuch-restore david
2012-11-15 2:42 ` [PATCH 1/2] notmuch-restore: remove extra increment of optind david
2012-11-15 2:42 ` [PATCH 2/2] notmuch-restore: fix error message for extra positional parameter david
@ 2012-11-15 15:23 ` Tomi Ollila
2012-11-15 22:25 ` David Bremner
3 siblings, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2012-11-15 15:23 UTC (permalink / raw)
To: david, notmuch
On Thu, Nov 15 2012, david@tethera.net wrote:
> Here are a couple of small fixes I noticed while working on notmuch-restore.
>
> I think the optind increment is harmless (although confusing) and the
> other is just correcting an error message.
LGTM.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: simple fixes for notmuch-restore
2012-11-15 2:42 simple fixes for notmuch-restore david
` (2 preceding siblings ...)
2012-11-15 15:23 ` simple fixes for notmuch-restore Tomi Ollila
@ 2012-11-15 22:25 ` David Bremner
3 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2012-11-15 22:25 UTC (permalink / raw)
To: notmuch
david@tethera.net writes:
> Here are a couple of small fixes I noticed while working on notmuch-restore.
Pushed both.
d
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-15 22:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 2:42 simple fixes for notmuch-restore david
2012-11-15 2:42 ` [PATCH 1/2] notmuch-restore: remove extra increment of optind david
2012-11-15 2:42 ` [PATCH 2/2] notmuch-restore: fix error message for extra positional parameter david
2012-11-15 15:23 ` simple fixes for notmuch-restore Tomi Ollila
2012-11-15 22:25 ` David Bremner
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).