Skip to content

Commit b3a5d5a

Browse files
jeffhostetlergitster
authored andcommitted
trace2:data: add subverb for rebase
Signed-off-by: Jeff Hostetler <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c18b6c1 commit b3a5d5a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

builtin/rebase.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,14 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
10271027
ACTION_EDIT_TODO,
10281028
ACTION_SHOW_CURRENT_PATCH,
10291029
} action = NO_ACTION;
1030+
static const char *action_names[] = { N_("undefined"),
1031+
N_("continue"),
1032+
N_("skip"),
1033+
N_("abort"),
1034+
N_("quit"),
1035+
N_("edit_todo"),
1036+
N_("show_current_patch"),
1037+
NULL };
10301038
const char *gpg_sign = NULL;
10311039
struct string_list exec = STRING_LIST_INIT_NODUP;
10321040
const char *rebase_merges = NULL;
@@ -1212,6 +1220,15 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
12121220
die(_("The --edit-todo action can only be used during "
12131221
"interactive rebase."));
12141222

1223+
if (trace2_is_enabled()) {
1224+
if (is_interactive(&options))
1225+
trace2_cmd_mode("interactive");
1226+
else if (exec.nr)
1227+
trace2_cmd_mode("interactive-exec");
1228+
else
1229+
trace2_cmd_mode(action_names[action]);
1230+
}
1231+
12151232
switch (action) {
12161233
case ACTION_CONTINUE: {
12171234
struct object_id head;

0 commit comments

Comments
 (0)