aboutsummaryrefslogtreecommitdiffstats
path: root/git.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2022-04-27 19:06:47 +0200
committerJunio C Hamano <gitster@pobox.com>2022-04-27 13:30:55 -0700
commitf62563988fefed73d795cfaeae203421b784c334 (patch)
tree64ffbdcd30ae07393fe9580df376b0d8cfa3b7ba /git.c
parentGit 2.36 (diff)
downloadgit-f62563988fefed73d795cfaeae203421b784c334.tar.gz
git-f62563988fefed73d795cfaeae203421b784c334.zip
t0033-safe-directory: check the error message without matching the trash dir
Since 8959555cee (setup_git_directory(): add an owner check for the top-level directory, 2022-03-02) when git finds itself in a repository owned by someone else, it aborts with a "fatal: unsafe repository (<repo path>)" error message and an advice about how to set the 'safe.directory' config variable to mark that repository as safe. 't0033-safe-directory.sh' contains tests that check that this feature and handling said config work as intended. To ensure that git dies for the right reason, several of those tests check that its standard error contains the name of that config variable, but: - it only appears in the advice part, not in the actual error message. - it is interpreted as a regexp by 'grep', so, because of the dot, it matches the name of the test script and the path of the trash directory as well. Consequently, these tests could be fooled by any error message that would happen to include the path of the test repository. Tighten these checks to look for "unsafe repository" instead. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions