git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/3] Support `git pull --rebase=interactive`

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 13, 2016, 12:17 UTC
Message-ID
<cover.1452687410.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1452668201.git.johannes.schindelin@gmx.de>

A couple of years ago, I found the need to collaborate on topic branches that were rebased all the time, and I really needed to see what I was rebasing when pulling, so I introduced an interactively-rebasing pull.

This patch series ports that work to the builtin pull.
Johannes Schindelin (3):
  pull: allow interactive rebase with --rebase=interactive
  remote: handle the config setting branch.*.rebase=interactive
  completion: add missing branch.*.rebase values
 Documentation/config.txt               |  4 ++++
 Documentation/git-pull.txt             |  4 +++-
 builtin/pull.c                         |  9 +++++++--
 builtin/remote.c                       | 10 +++++++---
 contrib/completion/git-completion.bash |  2 +-
 t/t5520-pull.sh                        | 10 ++++++++++
 6 files changed, 32 insertions(+), 7 deletions(-)
Interdiff vs v2:
 diff --git a/Documentation/config.txt b/Documentation/config.txt
 index e5897e9..0f710ca 100644
 --- a/Documentation/config.txt
 +++ b/Documentation/config.txt
 @@ -865,12 +865,13 @@ branch.<name>.rebase::
  	instead of merging the default branch from the default remote when
  	"git pull" is run. See "pull.rebase" for doing this in a non
  	branch-specific manner.
 -	When the value is `interactive`, the rebase is run in interactive mode.
  +
  When preserve, also pass `--preserve-merges` along to 'git rebase'
  so that locally committed merge commits will not be flattened
  by running 'git pull'.
  +
 +When the value is `interactive`, the rebase is run in interactive mode.
 ++
  *NOTE*: this is a possibly dangerous operation; do *not* use
  it unless you understand the implications (see linkgit:git-rebase[1]
  for details).
 @@ -2158,6 +2159,8 @@ When preserve, also pass `--preserve-merges` along to 'git rebase'
  so that locally committed merge commits will not be flattened
  by running 'git pull'.
  +
 +When the value is `interactive`, the rebase is run in interactive mode.
 ++
  *NOTE*: this is a possibly dangerous operation; do *not* use
  it unless you understand the implications (see linkgit:git-rebase[1]
  for details).
 diff --git a/builtin/pull.c b/builtin/pull.c
 index 832d0ad..c713fe0 100644
 --- a/builtin/pull.c
 +++ b/builtin/pull.c
 @@ -116,7 +116,7 @@ static struct option pull_options[] = {
  	/* Options passed to git-merge or git-rebase */
  	OPT_GROUP(N_("Options related to merging")),
  	{ OPTION_CALLBACK, 'r', "rebase", &opt_rebase,
 -	  "false|true|preserve",
 +	  "false|true|preserve|interactive",
  	  N_("incorporate changes by rebasing rather than merging"),
  	  PARSE_OPT_OPTARG, parse_opt_rebase },
  	OPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,
-- 
2.6.3.windows.1.300.g1c25e49
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 23 of 27 in “Support `git pull --rebase=interactive`”
  1. 0/3 Support `git pull --rebase=interactive`Johannes Schindelin, Jan 12, 2016
  2. 1/3 Teach 'git pull' to handle --rebase=interactiveJohannes Schindelin, Jan 12, 2016
  3. Junio C HamanoJan 12, 2016
  4. Johannes SchindelinJan 13, 2016
  5. 2/3 Teach 'git remote' that the config var branch.*.rebase can be 'interactive'Johannes Schindelin, Jan 12, 2016
  6. Junio C HamanoJan 12, 2016
  7. Johannes SchindelinJan 13, 2016
  8. Matthieu MoyJan 13, 2016
  9. Johannes SchindelinJan 13, 2016
  10. Matthieu MoyJan 13, 2016
  11. Johannes SchindelinJan 13, 2016
  12. 3/3 completion: add missing branch.*.rebase valuesJohannes Schindelin, Jan 12, 2016
  13. Junio C HamanoJan 12, 2016
  14. 0/3 Support `git pull --rebase=interactive`Johannes Schindelin, Jan 13, 2016
  15. 1/3 pull: allow interactive rebase with --rebase=interactiveJohannes Schindelin, Jan 13, 2016
  16. Paul TanJan 13, 2016
  17. Johannes SchindelinJan 13, 2016
  18. Junio C HamanoJan 13, 2016
  19. Johannes SchindelinJan 13, 2016
  20. Junio C HamanoJan 13, 2016
  21. 2/3 remote: handle the config setting branch.*.rebase=interactiveJohannes Schindelin, Jan 13, 2016
  22. 3/3 completion: add missing branch.*.rebase valuesJohannes Schindelin, Jan 13, 2016
  23. 0/3 Support `git pull --rebase=interactive`Johannes Schindelin, Jan 13, 2016
  24. 1/3 pull: allow interactive rebase with --rebase=interactiveJohannes Schindelin, Jan 13, 2016
  25. 2/3 remote: handle the config setting branch.*.rebase=interactiveJohannes Schindelin, Jan 13, 2016
  26. 3/3 completion: add missing branch.*.rebase valuesJohannes Schindelin, Jan 13, 2016
  27. Junio C HamanoJan 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.