]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/retire-preserve-merges'
authorJunio C Hamano <gitster@pobox.com>
Mon, 18 Oct 2021 22:47:56 +0000 (15:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Oct 2021 22:47:56 +0000 (15:47 -0700)
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.<name>.rebase values
  t5520: do not use `pull.rebase=preserve`

15 files changed:
1  2 
.github/workflows/main.yml
.gitignore
Documentation/git-pull.txt
Documentation/git-rebase.txt
Makefile
builtin/pull.c
builtin/rebase.c
contrib/completion/git-completion.bash
git.c
sequencer.c
sequencer.h
t/t3404-rebase-interactive.sh
t/t3418-rebase-continue.sh
t/t5520-pull.sh
t/test-lib.sh

Simple merge
diff --cc .gitignore
Simple merge
Simple merge
index c116dbf4bbb6e379cc3ce37d372ad8b9d613dc2f,1382dc6f00565771ed1a698a95599ba2a1681141..a1af21fcefe6098df8506c46e71a91585625281e
@@@ -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 `<upstream>` (or `<onto>`, 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 <strategy> [...]` commands.
  +
  See also REBASING MERGES and INCOMPATIBLE OPTIONS below.
diff --cc Makefile
Simple merge
diff --cc builtin/pull.c
Simple merge
index 8c6393f6d783834524095e4925131969abd99d6e,c4d4cf25028848dabeaec31373ef7c175dbc9bdf..34b4744e5f3b7ccd5c4a215f477a622cfa06e4a0
@@@ -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;
diff --cc git.c
Simple merge
diff --cc sequencer.c
Simple merge
diff --cc sequencer.h
Simple merge
Simple merge
Simple merge
diff --cc t/t5520-pull.sh
Simple merge
diff --cc t/test-lib.sh
Simple merge