diff mbox series

[v2,2/7] remote: warn about unhandled branch.<name>.rebase values

Message ID acda0f599475c07c6c1a5e75384e0cff98d2c19f.1630497435.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Drop support for git rebase --preserve-merges | expand

Commit Message

Johannes Schindelin Sept. 1, 2021, 11:57 a.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

We ignore them silently, but it actually makes sense to warn the users
that their config setting has no effect.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 builtin/remote.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/builtin/remote.c b/builtin/remote.c
index 7f88e6ce9de..5705e088e5b 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -318,6 +318,9 @@  static int config_read_branches(const char *key, const char *value, void *cb)
 		 * truth value with >= REBASE_TRUE.
 		 */
 		info->rebase = rebase_parse_value(value);
+		if (info->rebase == REBASE_INVALID)
+			warning(_("unhandled branch.%s.rebase=%s; assuming "
+				  "'true'"), name, value);
 		break;
 	case PUSH_REMOTE:
 		if (info->push_remote_name)