Skip to content

Commit 799fdb4

Browse files
committed
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
2 parents c985ddf + e97ca7f commit 799fdb4

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

builtin-commit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
8686
static struct option builtin_commit_options[] = {
8787
OPT__QUIET(&quiet),
8888
OPT__VERBOSE(&verbose),
89-
OPT_GROUP("Commit message options"),
9089

90+
OPT_GROUP("Commit message options"),
9191
OPT_STRING('F', "file", &logfile, "FILE", "read log from file"),
9292
OPT_STRING(0, "author", &force_author, "AUTHOR", "override author for commit"),
9393
OPT_CALLBACK('m', "message", &message, "MESSAGE", "specify commit message", opt_parse_m),
@@ -96,6 +96,8 @@ static struct option builtin_commit_options[] = {
9696
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
9797
OPT_STRING('t', "template", &template_file, "FILE", "use specified template file"),
9898
OPT_BOOLEAN('e', "edit", &edit_flag, "force edit of commit"),
99+
OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"),
100+
/* end commit message options */
99101

100102
OPT_GROUP("Commit contents options"),
101103
OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
@@ -106,7 +108,7 @@ static struct option builtin_commit_options[] = {
106108
OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
107109
{ 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" },
108110
OPT_BOOLEAN(0, "allow-empty", &allow_empty, "ok to record an empty change"),
109-
OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"),
111+
/* end commit contents options */
110112

111113
OPT_END()
112114
};

t/t7102-reset.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ test_expect_success \
139139
test_expect_success \
140140
'resetting to HEAD with no changes should succeed and do nothing' '
141141
git reset --hard &&
142-
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
142+
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
143143
git reset --hard HEAD &&
144-
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
144+
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
145145
git reset --soft &&
146-
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
146+
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
147147
git reset --soft HEAD &&
148-
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
148+
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
149149
git reset --mixed &&
150-
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
150+
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
151151
git reset --mixed HEAD &&
152-
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
152+
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
153153
git reset &&
154-
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
154+
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
155155
git reset HEAD &&
156156
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
157157
'

0 commit comments

Comments
 (0)