diff options
Diffstat (limited to 'imap-send.c')
| -rw-r--r-- | imap-send.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/imap-send.c b/imap-send.c index 54dab627d6..ccf7195fd7 100644 --- a/imap-send.c +++ b/imap-send.c @@ -46,12 +46,14 @@ static int verbosity; static int use_curl = USE_CURL_DEFAULT; +static char *opt_folder; -static const char * const imap_send_usage[] = { "git imap-send [-v] [-q] [--[no-]curl] < <mbox>", NULL }; +static const char * const imap_send_usage[] = { "git imap-send [-v] [-q] [--[no-]curl] [(--folder|-f) <folder>] < <mbox>", NULL }; static struct option imap_send_options[] = { OPT__VERBOSITY(&verbosity), OPT_BOOL(0, "curl", &use_curl, "use libcurl to communicate with the IMAP server"), + OPT_STRING('f', "folder", &opt_folder, "folder", "specify the IMAP folder"), OPT_END() }; @@ -1722,6 +1724,11 @@ int cmd_main(int argc, const char **argv) argc = parse_options(argc, (const char **)argv, "", imap_send_options, imap_send_usage, 0); + if (opt_folder) { + free(server.folder); + server.folder = xstrdup(opt_folder); + } + if (argc) usage_with_options(imap_send_usage, imap_send_options); |
