Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
  commit: --cleanup is a message option
  t7102: make the test fail if one of its check fails
This commit is contained in:
Junio C Hamano 2009-12-29 20:16:34 -08:00
Родитель c985ddf318 e97ca7f41f
Коммит 799fdb4ed0
2 изменённых файлов: 11 добавлений и 9 удалений

Просмотреть файл

@ -86,8 +86,8 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
static struct option builtin_commit_options[] = { static struct option builtin_commit_options[] = {
OPT__QUIET(&quiet), OPT__QUIET(&quiet),
OPT__VERBOSE(&verbose), OPT__VERBOSE(&verbose),
OPT_GROUP("Commit message options"),
OPT_GROUP("Commit message options"),
OPT_STRING('F', "file", &logfile, "FILE", "read log from file"), OPT_STRING('F', "file", &logfile, "FILE", "read log from file"),
OPT_STRING(0, "author", &force_author, "AUTHOR", "override author for commit"), OPT_STRING(0, "author", &force_author, "AUTHOR", "override author for commit"),
OPT_CALLBACK('m', "message", &message, "MESSAGE", "specify commit message", opt_parse_m), OPT_CALLBACK('m', "message", &message, "MESSAGE", "specify commit message", opt_parse_m),
@ -96,6 +96,8 @@ static struct option builtin_commit_options[] = {
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"), OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
OPT_STRING('t', "template", &template_file, "FILE", "use specified template file"), OPT_STRING('t', "template", &template_file, "FILE", "use specified template file"),
OPT_BOOLEAN('e', "edit", &edit_flag, "force edit of commit"), 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_GROUP("Commit contents options"),
OPT_BOOLEAN('a', "all", &all, "commit all changed files"), OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
@ -106,7 +108,7 @@ static struct option builtin_commit_options[] = {
OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"), OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
{ OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
OPT_BOOLEAN(0, "allow-empty", &allow_empty, "ok to record an empty change"), OPT_BOOLEAN(0, "allow-empty", &allow_empty, "ok to record an empty change"),
OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"), /* end commit contents options */
OPT_END() OPT_END()
}; };

Просмотреть файл

@ -139,19 +139,19 @@ test_expect_success \
test_expect_success \ test_expect_success \
'resetting to HEAD with no changes should succeed and do nothing' ' 'resetting to HEAD with no changes should succeed and do nothing' '
git reset --hard && git reset --hard &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git reset --hard HEAD && git reset --hard HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git reset --soft && git reset --soft &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git reset --soft HEAD && git reset --soft HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git reset --mixed && git reset --mixed &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git reset --mixed HEAD && git reset --mixed HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git reset && git reset &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git reset HEAD && git reset HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
' '