summaryrefslogtreecommitdiff
path: root/builtin/am.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-06-17 15:55:56 -0700
committerJunio C Hamano <gitster@pobox.com>2024-06-17 15:55:56 -0700
commit42b8b5bfd04c993ceb4c79a995cf9f6851aee95b (patch)
treed4f486496535851df1fb5520301a1cdf956c1059 /builtin/am.c
parentcff3b034d5e75c84725823290afed62c93bc2317 (diff)
parent62c71ace4449df4b22a5d568f3699238ea032495 (diff)
Merge branch 'jk/am-retry'
"git am" has a safety feature to prevent it from starting a new session when there already is a session going. It reliably triggers when a mbox is given on the command line, but it has to rely on the tty-ness of the standard input. Add an explicit way to opt out of this safety with a command line option. * jk/am-retry: test-terminal: drop stdin handling am: add explicit "--retry" option
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 36839029d2..926592691a 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2393,6 +2393,9 @@ int cmd_am(int argc, const char **argv, const char *prefix)
N_("show the patch being applied"),
PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
parse_opt_show_current_patch, RESUME_SHOW_PATCH_RAW },
+ OPT_CMDMODE(0, "retry", &resume_mode,
+ N_("try to apply current patch again"),
+ RESUME_APPLY),
OPT_CMDMODE(0, "allow-empty", &resume_mode,
N_("record the empty patch as an empty commit"),
RESUME_ALLOW_EMPTY),