worktree: allow to (re)move worktrees with uninitialized submodules
[gitweb.git] / t / t7518-ident-corner-cases.sh
index 667f110f59302e84a816cf764d7c0eebfc293642..b22f631261f0a666ff5c4dc226be4f758f002709 100755 (executable)
@@ -22,4 +22,15 @@ test_expect_success 'commit rejects all-crud name' '
                git commit --allow-empty -m foo
 '
 
+# We must test the actual error message here, as an unwanted
+# auto-detection could fail for other reasons.
+test_expect_success 'empty configured name does not auto-detect' '
+       (
+               sane_unset GIT_AUTHOR_NAME &&
+               test_must_fail \
+                       git -c user.name= commit --allow-empty -m foo 2>err &&
+               test_i18ngrep "empty ident name" err
+       )
+'
+
 test_done