]> git.ipfire.org Git - thirdparty/git.git/commitdiff
remote: warn about unhandled branch.<name>.rebase values
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 7 Sep 2021 21:05:03 +0000 (21:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Sep 2021 04:45:32 +0000 (21:45 -0700)
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>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/remote.c

index 7f88e6ce9deb7666b7ce5cb9179b895a25281e64..5705e088e5b92ff245c78a99f27c3df0e04eaf90 100644 (file)
@@ -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)