Skip to content

Commit ed7e9ed

Browse files
committed
Merge branch 'fc/opt-quiet-gc-reset'
* fc/opt-quiet-gc-reset: General --quiet improvements
2 parents 83b10ca + 5d2dcc4 commit ed7e9ed

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Documentation/git-reset.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ This means that `git reset -p` is the opposite of `git add -p` (see
6262
linkgit:git-add[1]).
6363

6464
-q::
65+
--quiet::
6566
Be quiet, only report errors.
6667

6768
<commit>::

builtin-gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
180180
char buf[80];
181181

182182
struct option builtin_gc_options[] = {
183+
OPT__QUIET(&quiet),
183184
{ OPTION_STRING, 0, "prune", &prune_expire, "date",
184185
"prune unreferenced objects",
185186
PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },
186187
OPT_BOOLEAN(0, "aggressive", &aggressive, "be more thorough (increased runtime)"),
187188
OPT_BOOLEAN(0, "auto", &auto_gc, "enable auto-gc mode"),
188-
OPT_BOOLEAN('q', "quiet", &quiet, "suppress progress reports"),
189189
OPT_END()
190190
};
191191

builtin-reset.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,14 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
202202
struct commit *commit;
203203
char *reflog_action, msg[1024];
204204
const struct option options[] = {
205+
OPT__QUIET(&quiet),
205206
OPT_SET_INT(0, "mixed", &reset_type,
206207
"reset HEAD and index", MIXED),
207208
OPT_SET_INT(0, "soft", &reset_type, "reset only HEAD", SOFT),
208209
OPT_SET_INT(0, "hard", &reset_type,
209210
"reset HEAD, index and working tree", HARD),
210211
OPT_SET_INT(0, "merge", &reset_type,
211212
"reset HEAD, index and working tree", MERGE),
212-
OPT_BOOLEAN('q', NULL, &quiet,
213-
"disable showing new HEAD in hard reset and progress message"),
214213
OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
215214
OPT_END()
216215
};

0 commit comments

Comments
 (0)