| 1094 | } |
| 1095 | |
| 1096 | int cmd_rebase(int argc, |
| 1097 | const char **argv, |
| 1098 | const char *prefix, |
| 1099 | struct repository *repo UNUSED) |
| 1100 | { |
| 1101 | struct rebase_options options = REBASE_OPTIONS_INIT; |
| 1102 | const char *branch_name; |
| 1103 | const char *strategy_opt = NULL; |
| 1104 | int ret, flags, total_argc, in_progress = 0; |
| 1105 | int keep_base = 0; |
| 1106 | int ok_to_skip_pre_rebase = 0; |
| 1107 | struct strbuf msg = STRBUF_INIT; |
| 1108 | struct strbuf revisions = STRBUF_INIT; |
| 1109 | struct strbuf buf = STRBUF_INIT; |
| 1110 | struct object_id branch_base; |
| 1111 | int ignore_whitespace = 0; |
| 1112 | const char *gpg_sign = NULL; |
| 1113 | struct object_id squash_onto; |
| 1114 | char *squash_onto_name = NULL; |
| 1115 | char *keep_base_onto_name = NULL; |
| 1116 | int reschedule_failed_exec = -1; |
| 1117 | int allow_preemptive_ff = 1; |
| 1118 | int preserve_merges_selected = 0; |
| 1119 | struct reset_head_opts ropts = { 0 }; |
| 1120 | struct option builtin_rebase_options[] = { |
| 1121 | OPT_STRING(0, "onto", &options.onto_name, |
| 1122 | N_("revision"), |
| 1123 | N_("rebase onto given branch instead of upstream")), |
| 1124 | OPT_BOOL(0, "keep-base", &keep_base, |
| 1125 | N_("use the merge-base of upstream and branch as the current base")), |
| 1126 | OPT_BOOL(0, "no-verify", &ok_to_skip_pre_rebase, |
| 1127 | N_("allow pre-rebase hook to run")), |
| 1128 | OPT_NEGBIT('q', "quiet", &options.flags, |
| 1129 | N_("be quiet. implies --no-stat"), |
| 1130 | REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT), |
| 1131 | OPT_BIT('v', "verbose", &options.flags, |
| 1132 | N_("display a diffstat of what changed upstream"), |
| 1133 | REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT), |
| 1134 | { |
| 1135 | .type = OPTION_NEGBIT, |
| 1136 | .short_name = 'n', |
| 1137 | .long_name = "no-stat", |
| 1138 | .value = &options.flags, |
| 1139 | .precision = sizeof(options.flags), |
| 1140 | .help = N_("do not show diffstat of what changed upstream"), |
| 1141 | .flags = PARSE_OPT_NOARG, |
| 1142 | .defval = REBASE_DIFFSTAT, |
| 1143 | }, |
| 1144 | OPT_STRVEC(0, "trailer", &options.trailer_args, N_("trailer"), |
| 1145 | N_("add custom trailer(s)")), |
| 1146 | OPT_BOOL(0, "signoff", &options.signoff, |
| 1147 | N_("add a Signed-off-by trailer to each commit")), |
| 1148 | OPT_BOOL(0, "committer-date-is-author-date", |
| 1149 | &options.committer_date_is_author_date, |
| 1150 | N_("make committer date match author date")), |
| 1151 | OPT_BOOL(0, "reset-author-date", &options.ignore_date, |
| 1152 | N_("ignore author date and use current date")), |
| 1153 | OPT_HIDDEN_BOOL(0, "ignore-date", &options.ignore_date, |
nothing calls this directly
no test coverage detected