From: Junio C Hamano Date: Mon, 18 Oct 2021 22:47:56 +0000 (-0700) Subject: Merge branch 'js/retire-preserve-merges' X-Git-Tag: v2.34.0-rc0~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=223a1bfb5821387981c700654e4edd2443c5a7fc;p=thirdparty%2Fgit.git Merge branch 'js/retire-preserve-merges' The "--preserve-merges" option of "git rebase" has been removed. * js/retire-preserve-merges: sequencer: restrict scope of a formerly public function rebase: remove a no-longer-used function rebase: stop mentioning the -p option in comments rebase: remove obsolete code comment rebase: drop the internal `rebase--interactive` command git-svn: drop support for `--preserve-merges` rebase: drop support for `--preserve-merges` pull: remove support for `--rebase=preserve` tests: stop testing `git rebase --preserve-merges` remote: warn about unhandled branch..rebase values t5520: do not use `pull.rebase=preserve` --- 223a1bfb5821387981c700654e4edd2443c5a7fc diff --cc Documentation/git-rebase.txt index c116dbf4bb,1382dc6f00..a1af21fcef --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@@ -527,12 -525,8 +527,8 @@@ i.e. commits that would be excluded by the `rebase-cousins` mode is turned on, such commits are instead rebased onto `` (or ``, if specified). + - The `--rebase-merges` mode is similar in spirit to the deprecated - `--preserve-merges` but works with interactive rebases, - where commits can be reordered, inserted and dropped at will. - + It is currently only possible to recreate the merge commits using the -`recursive` merge strategy; Different merge strategies can be used only via +`ort` merge strategy; different merge strategies can be used only via explicit `exec git merge -s [...]` commands. + See also REBASING MERGES and INCOMPATIBLE OPTIONS below. diff --cc builtin/rebase.c index 8c6393f6d7,c4d4cf2502..34b4744e5f --- a/builtin/rebase.c +++ b/builtin/rebase.c @@@ -403,9 -322,7 +322,8 @@@ static int run_sequencer_rebase(struct flags |= opts->rebase_merges ? TODO_LIST_REBASE_MERGES : 0; flags |= opts->rebase_cousins > 0 ? TODO_LIST_REBASE_COUSINS : 0; flags |= opts->root_with_onto ? TODO_LIST_ROOT_WITH_ONTO : 0; - flags |= command == ACTION_SHORTEN_OIDS ? TODO_LIST_SHORTEN_IDS : 0; flags |= opts->reapply_cherry_picks ? TODO_LIST_REAPPLY_CHERRY_PICKS : 0; + flags |= opts->flags & REBASE_NO_QUIET ? TODO_LIST_WARN_SKIPPED_CHERRY_PICKS : 0; switch (command) { case ACTION_NONE: { @@@ -765,17 -568,17 +568,6 @@@ static int finish_rebase(struct rebase_ return ret; } - static void add_var(struct strbuf *buf, const char *name, const char *value) -static struct commit *peel_committish(const char *name) --{ - if (!value) - strbuf_addf(buf, "unset %s; ", name); - else { - strbuf_addf(buf, "%s=", name); - sq_quote_buf(buf, value); - strbuf_addstr(buf, "; "); - } - struct object *obj; - struct object_id oid; - - if (get_oid(name, &oid)) - return NULL; - obj = parse_object(the_repository, &oid); - return (struct commit *)peel_to_type(name, 0, obj, OBJ_COMMIT); --} -- static int move_to_original_branch(struct rebase_options *opts) { struct strbuf orig_head_reflog = STRBUF_INIT, head_reflog = STRBUF_INIT;