summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff39685)
raw | patch | inline | side by side (parent: ff39685)
author | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 10 Mar 2011 02:11:44 +0000 (21:11 -0500) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 10 Mar 2011 02:12:30 +0000 (21:12 -0500) |
tig.c | patch | blob | history |
index f022f17a974b2424f32e6c729a191f6672ac2792..f56547455c50dcf170dbdb0f8424915a9db2c40e 100644 (file)
--- a/tig.c
+++ b/tig.c
static enum option_code
parse_args(const char ***args, const char *argv[])
{
- if (!argv_copy(args, argv))
+ if (*args == NULL && !argv_copy(args, argv))
return OPT_ERR_OUT_OF_MEMORY;
return OPT_OK;
}
if (argc < 3)
return OPT_ERR_WRONG_NUMBER_OF_ARGUMENTS;
- if (!opt_blame_argv && !strcmp(argv[0], "blame-options"))
+ if (strcmp(argv[1], "="))
+ return OPT_ERR_NO_VALUE_ASSIGNED;
+
+ if (!strcmp(argv[0], "blame-options"))
return parse_args(&opt_blame_argv, argv + 2);
if (argc != 3)
return OPT_ERR_WRONG_NUMBER_OF_ARGUMENTS;
- if (strcmp(argv[1], "="))
- return OPT_ERR_NO_VALUE_ASSIGNED;
-
if (!strcmp(argv[0], "show-author"))
return parse_enum(&opt_author, argv[2], author_map);