summaryrefslogtreecommitdiff
path: root/t/t7103-reset-bare.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7103-reset-bare.sh')
-rwxr-xr-xt/t7103-reset-bare.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index 68041df5f4..afb55b3a46 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -29,6 +29,12 @@ test_expect_success 'soft reset is ok' '
(cd .git && git reset --soft)
'
+test_expect_success 'hard reset works with GIT_WORK_TREE' '
+ mkdir worktree &&
+ GIT_WORK_TREE=$PWD/worktree GIT_DIR=$PWD/.git git reset --hard &&
+ test_cmp file worktree/file
+'
+
test_expect_success 'setup bare' '
git clone --bare . bare.git &&
cd bare.git