archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] rebase: make the default backend configurable
@ 2019-12-20 17:09 Elijah Newren via GitGitGadget
  2019-12-20 17:09 ` [PATCH 01/15] rebase: extend the options for handling of empty commits Elijah Newren via GitGitGadget
                   ` (16 more replies)
  0 siblings, 17 replies; 161+ messages in thread
From: Elijah Newren via GitGitGadget @ 2019-12-20 17:09 UTC (permalink / raw)
  To: git
  Cc: Johannes.Schindelin, phillip.wood, liu.denton, gitster, plroskin,
	Junio C Hamano

This series does a lot of work around making the default rebase backend

 * provide configurability of handling empty commits and iron out
   differences between backends
 * increase/fix capabilities of the merge/interactive backend to make it
   workable as the default
 * document the remaining differences in backends more thoroughly
 * add an --am option for explicitly requesting the am-backend
 * extend merge/interactive backend testing to put it on par with the am
 * add a 'rebase.backend' config option and:
 * switch the rebase.backend default value from 'am' to 'merge'.

Areas I'd like reviewers to focus, in priority order:

 * Patch 15 (Are we ready to switch the default backend? Or should we leave
   this patch out for now? Junio suggested we may be ready or at least are
 * Patch 1 (Does my empty handling make sense? Do others agree I fixed 
   --keep-empty, or do they view it as breaking it?)
 * Patch 8 (Do the updates to the documentation of behavioral differences
   make sense? Is it too long?) * Patch 11 (okay to change the
      git-completion shell prompt slightly, especially in light of patches
      15 & 16? We did a prompt change previously when we merged the merge
      backend with the interactive one, so I assume so, but just want to
      make sure people have a chance to chime in.)

If it's too soon to switch from the 'am' to 'merge' backend, we can just
drop the last patch and I'll resubmit it later. I generated this series
mostly through switching the default first and then watching what broke, but
moved the patch to the end to make it easy to drop.

Briefly, reasons for switching the default backend boil down to the fact
that the am-backend drops information and thus limits what it can do. This
manifests in different ways:

 * lack of tree information that would allow us to warn users that new files
   in old directories might want to move along with the other files that
   were renamed with those directories[1]
 * incorrect application of patches in the presence of non-unique context
   lines[2], which could be avoided with access to the original files
 * less information available to annotate conflict markers (since am creates
   fake ancestors and commits on top of them, and doesn't have access to the
   original commits)


Elijah Newren (15):
  rebase: extend the options for handling of empty commits
  t3406: simplify an already simple test
  rebase, sequencer: remove the broken GIT_QUIET handling
  rebase: make sure to pass along the quiet flag to the sequencer
  rebase: fix handling of restrict_revision
  t3432: make these tests work with either am or merge backends
  rebase: allow more types of rebases to fast-forward
  git-rebase.txt: add more details about behavioral differences of
  rebase: move incompatibility checks between backend options a bit
  rebase: add an --am option
  contrib: change the prompt for am-based rebases
  rebase tests: mark tests specific to the am-backend with --am
  rebase tests: repeat some tests using the merge backend instead of am
  rebase: make the backend configurable via config setting
  rebase: change the default backend from "am" to "merge"

 Documentation/config/rebase.txt         |   8 ++
 Documentation/git-rebase.txt            | 150 ++++++++++++++++----
 builtin/rebase.c                        | 181 +++++++++++++++++++-----
 contrib/completion/        |   2 +-
 rebase-interactive.c                    |   4 +-
 rebase-interactive.h                    |   2 +-
 sequencer.c                             |  80 ++++++++---
 sequencer.h                             |   6 +-
 t/                       |  36 ++++-
 t/         |   4 +-
 t/           |   2 +-
 t/               |  19 ++-
 t/                 |   6 +-
 t/             |   2 +-
 t/       |   4 +-
 t/                 |  89 ++++++++++++
 t/       |   8 +-
 t/               |  16 ++-
 t/          |  59 ++++----
 t/ |  13 +-
 t/            |  12 +-
 t/                         |  27 +++-
 t/       |  13 +-
 t/                  |  12 +-
 t/  |   3 +-
 t/                  |   6 +-
 26 files changed, 582 insertions(+), 182 deletions(-)
 create mode 100755 t/

base-commit: 12029dc57db23baef008e77db1909367599210ee
Fetch-It-Via: git fetch pr-git-679/newren/rebase-fixes-v1

^ permalink raw reply	[flat|nested] 161+ messages in thread