Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-03 20:25:41 +0400
committerJunio C Hamano <gitster@pobox.com>2013-04-03 20:25:41 +0400
commiteeecf393972b9ca4a37adb8785f16e9617eecc57 (patch)
tree93ce84715443f1ef90ce5f8e90ebb75cf4056103 /t/t1510-repo-setup.sh
parente6658b9d6917d9888fa41702bf53393c57de0631 (diff)
parent2cd83d10bb6bcf768129e1c4e5a4dee4b6bcd27f (diff)
Merge branch 'jk/alias-in-bare' into maint
An aliased command spawned from a bare repository that does not say it is bare with "core.bare = yes" is treated as non-bare by mistake. * jk/alias-in-bare: setup: suppress implicit "." work-tree for bare repos environment: add GIT_PREFIX to local_repo_env cache.h: drop LOCAL_REPO_ENV_SIZE
Diffstat (limited to 't/t1510-repo-setup.sh')
-rwxr-xr-xt/t1510-repo-setup.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index 80aedfca8c..cf2ee7885a 100755
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
@@ -517,6 +517,25 @@ test_expect_success '#16c: bare .git has no worktree' '
"$here/16c/.git" "(null)" "$here/16c/sub" "(null)"
'
+test_expect_success '#16d: bareness preserved across alias' '
+ setup_repo 16d unset "" unset &&
+ (
+ cd 16d/.git &&
+ test_must_fail git status &&
+ git config alias.st status &&
+ test_must_fail git st
+ )
+'
+
+test_expect_success '#16e: bareness preserved by --bare' '
+ setup_repo 16e unset "" unset &&
+ (
+ cd 16e/.git &&
+ test_must_fail git status &&
+ test_must_fail git --bare status
+ )
+'
+
test_expect_success '#17: GIT_WORK_TREE without explicit GIT_DIR is accepted (bare case)' '
# Just like #16.
setup_repo 17a unset "" true &&