Skip to content

Commit 68d0a78

Browse files
committed
trace2:data: add subverb for rebase
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
1 parent b006aff commit 68d0a78

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

builtin/rebase.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,16 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
10091009
ACTION_EDIT_TODO,
10101010
ACTION_SHOW_CURRENT_PATCH,
10111011
} action = NO_ACTION;
1012+
static const char *action_names[] = {
1013+
N_("undefined"),
1014+
N_("continue"),
1015+
N_("skip"),
1016+
N_("abort"),
1017+
N_("quit"),
1018+
N_("edit_todo"),
1019+
N_("show_current_patch"),
1020+
NULL
1021+
};
10121022
const char *gpg_sign = NULL;
10131023
struct string_list exec = STRING_LIST_INIT_NODUP;
10141024
const char *rebase_merges = NULL;
@@ -1195,6 +1205,15 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
11951205
die(_("The --edit-todo action can only be used during "
11961206
"interactive rebase."));
11971207

1208+
if (trace2_is_enabled()) {
1209+
if (is_interactive(&options))
1210+
trace2_cmd_subverb("interactive");
1211+
else if (exec.nr)
1212+
trace2_cmd_subverb("interactive-exec");
1213+
else
1214+
trace2_cmd_subverb(action_names[action]);
1215+
}
1216+
11981217
switch (action) {
11991218
case ACTION_CONTINUE: {
12001219
struct object_id head;

0 commit comments

Comments
 (0)