Merge branch 'sg/help-autocorrect-config-fix'
The code to auto-correct a misspelt subcommand unnecessarily called into git_default_config() from the early config codepath, which was a no-no. This has bee corrected. * sg/help-autocorrect-config-fix: help.c: fix autocorrect in work tree for bare repositorymaint
commit
4a9b839dd1
2
help.c
2
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)
|
||||
|
|
|
@ -62,4 +62,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
|
||||
|
|
Loading…
Reference in New Issue