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

[PATCH v2 2/3] remote: handle the config setting branch.*.rebase=interactive

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

The config variable branch.<branchname>.rebase is not only used by `git pull`, but also by `git remote` when showing details about a remote. Therefore, it needs to be taught to accept the newly-introduced `interactive` value of said variable.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 builtin/remote.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 6694cf2..2b2ff9b 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -251,7 +251,7 @@ static int add(int argc, const char **argv)
 struct branch_info {
 	char *remote_name;
 	struct string_list merge;
-	int rebase;
+	enum { NO_REBASE, NORMAL_REBASE, INTERACTIVE_REBASE } rebase;
 };
 
 static struct string_list branch_list;
@@ -311,7 +311,9 @@ static int config_read_branches(const char *key, const char *value, void *cb)
 			if (v >= 0)
 				info->rebase = v;
 			else if (!strcmp(value, "preserve"))
-				info->rebase = 1;
+				info->rebase = NORMAL_REBASE;
+			else if (!strcmp(value, "interactive"))
+				info->rebase = INTERACTIVE_REBASE;
 		}
 	}
 	return 0;
@@ -980,7 +982,9 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
 
 	printf("    %-*s ", show_info->width, item->string);
 	if (branch_info->rebase) {
-		printf_ln(_("rebases onto remote %s"), merge->items[0].string);
+		printf_ln(_(branch_info->rebase == INTERACTIVE_REBASE ?
+			"rebases interactively onto remote %s" :
+			"rebases onto remote %s"), merge->items[0].string);
 		return 0;
 	} else if (show_info->any_rebase) {
 		printf_ln(_(" merges with remote %s"), merge->items[0].string);
-- 
2.6.3.windows.1.300.g1c25e49
Previous: Junio C HamanoNext: Johannes Schindelin
Message 21 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.