worktree: allow to (re)move worktrees with uninitialized submodules
[gitweb.git] / t / t7518-ident-corner-cases.sh
index 6c057afc116fe3e9c20e0e4b0ee68a32bf066a9a..b22f631261f0a666ff5c4dc226be4f758f002709 100755 (executable)
@@ -17,4 +17,20 @@ test_expect_success 'empty name and missing email' '
        )
 '
 
+test_expect_success 'commit rejects all-crud name' '
+       test_must_fail env GIT_AUTHOR_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