diff --git a/builtin-commit.c b/builtin-commit.c
index 46e649cd7ca0a2ede8f010a6d3bf294f81b85d55..baaa75cf908d57e6d8540b6483684400c0b2494b 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
const char **pathspec = NULL;
if (interactive) {
- interactive_add(argc, argv, prefix);
+ if (interactive_add(argc, argv, prefix) != 0)
+ die("interactive add failed");
if (read_cache_preload(NULL) < 0)
die("index file corrupt");
commit_style = COMMIT_AS_IS;
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);
if (force_author && !strchr(force_author, '>'))
force_author = find_author_by_nickname(force_author);