diff --git a/help.c b/help.c index f1e090a442..812af4cdea 100644 --- a/help.c +++ b/help.c @@ -563,7 +563,7 @@ static int git_unknown_cmd_config(const char *var, const char *value, void *cb) if (skip_prefix(var, "alias.", &p)) add_cmdname(&aliases, p, strlen(p)); - return git_default_config(var, value, cb); + return 0; } static int levenshtein_compare(const void *p1, const void *p2) diff --git a/t/t9003-help-autocorrect.sh b/t/t9003-help-autocorrect.sh index f00deaf381..f5b6b4f746 100755 --- a/t/t9003-help-autocorrect.sh +++ b/t/t9003-help-autocorrect.sh @@ -60,4 +60,10 @@ test_expect_success 'autocorrect can be declined altogether' ' test_line_count = 1 actual ' +test_expect_success 'autocorrect works in work tree created from bare repo' ' + git clone --bare . bare.git && + git -C bare.git worktree add ../worktree && + git -C worktree -c help.autocorrect=immediate stauts +' + test_done