diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-05-31 16:57:42 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-05-31 16:57:42 -0700 |
| commit | f9275c68af58e0f65e1557b5109ccbfdbbbc384a (patch) | |
| tree | 7479d66d97277f47490de10e204cfcbc0a123885 /builtin-commit.c | |
| parent | 714cdcd03e2caac6e2dc8d94debc7c800742f546 (diff) | |
| parent | df217ed6430efe444a09fffdafd39720ae3f9864 (diff) | |
| download | git-f9275c68af58e0f65e1557b5109ccbfdbbbc384a.tar.xz | |
Merge branch 'sb/opt-filename'
* sb/opt-filename:
parse-opts: add OPT_FILENAME and transition builtins
parse-opts: prepare for OPT_FILENAME
Conflicts:
builtin-log.c
Diffstat (limited to 'builtin-commit.c')
| -rw-r--r-- | builtin-commit.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index baaa75cf90..41e222d267 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -88,13 +88,13 @@ static struct option builtin_commit_options[] = { OPT__VERBOSE(&verbose), OPT_GROUP("Commit message options"), - OPT_STRING('F', "file", &logfile, "FILE", "read log from file"), + OPT_FILENAME('F', "file", &logfile, "read log from file"), OPT_STRING(0, "author", &force_author, "AUTHOR", "override author for commit"), OPT_CALLBACK('m', "message", &message, "MESSAGE", "specify commit message", opt_parse_m), OPT_STRING('c', "reedit-message", &edit_message, "COMMIT", "reuse and edit message from specified commit "), OPT_STRING('C', "reuse-message", &use_message, "COMMIT", "reuse message from specified commit"), OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"), - OPT_STRING('t', "template", &template_file, "FILE", "use specified template file"), + OPT_FILENAME('t', "template", &template_file, "use specified template file"), OPT_BOOLEAN('e', "edit", &edit_flag, "force edit of commit"), OPT_GROUP("Commit contents options"), @@ -697,13 +697,8 @@ static int parse_and_validate_options(int argc, const char *argv[], { int f = 0; - argc = parse_options(argc, argv, builtin_commit_options, usage, 0); - logfile = parse_options_fix_filename(prefix, logfile); - if (logfile) - logfile = xstrdup(logfile); - template_file = parse_options_fix_filename(prefix, template_file); - if (template_file) - template_file = xstrdup(template_file); + argc = parse_options(argc, argv, prefix, builtin_commit_options, usage, + 0); if (force_author && !strchr(force_author, '>')) force_author = find_author_by_nickname(force_author); |
