From: Junio C Hamano Date: Wed, 30 Dec 2009 09:24:12 +0000 (-0800) Subject: Merge branch 'maint-1.6.1' into maint X-Git-Tag: v1.6.6.1~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b0b3a241e2ca1ba5b928a128b6dcafb990df6e75;p=git.git Merge branch 'maint-1.6.1' into maint * maint-1.6.1: textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails Conflicts: builtin-commit.c diff.c --- b0b3a241e2ca1ba5b928a128b6dcafb990df6e75 diff --cc builtin-commit.c index f54772f74,bf01ae776..33aa593c2 --- a/builtin-commit.c +++ b/builtin-commit.c @@@ -86,17 -86,18 +86,19 @@@ static int opt_parse_m(const struct opt static struct option builtin_commit_options[] = { OPT__QUIET(&quiet), OPT__VERBOSE(&verbose), - OPT_GROUP("Commit message options"), + 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', "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(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C-c/--amend)"), 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_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"), + /* end commit message options */ OPT_GROUP("Commit contents options"), OPT_BOOLEAN('a', "all", &all, "commit all changed files"), diff --cc diff.c index 08bbd3e90,69147b802..6da52e0c4 --- a/diff.c +++ b/diff.c @@@ -3776,12 -3485,15 +3776,14 @@@ static char *run_textconv(const char *p if (start_command(&child) != 0 || strbuf_read(&buf, child.out, 0) < 0 || finish_command(&child) != 0) { + close(child.out); - if (temp.name == temp.tmp_path) - unlink(temp.name); + strbuf_release(&buf); + remove_tempfile(); error("error running textconv command '%s'", pgm); return NULL; } + close(child.out); - if (temp.name == temp.tmp_path) - unlink(temp.name); + remove_tempfile(); return strbuf_detach(&buf, outsize); }