trace2:data: add subverb for rebase

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff Hostetler committed Feb 22, 2019 at 14:25 UTC b3a5d5a80ce76ebfc1f7c86afe985562174b6325
1 file changed +17
builtin/rebase.c
+17
@@ -1027,6 +1027,14 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1027 ACTION_EDIT_TODO,
1028 ACTION_SHOW_CURRENT_PATCH,
1029 } 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 };
1038 const char *gpg_sign = NULL;
1039 struct string_list exec = STRING_LIST_INIT_NODUP;
1040 const char *rebase_merges = NULL;
@@ -1212,6 +1220,15 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1220 die(_("The --edit-todo action can only be used during "
1221 "interactive rebase."));
1222
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 +
1232 switch (action) {
1233 case ACTION_CONTINUE: {
1234 struct object_id head;