diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t1501-work-tree.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t1501-work-tree.sh b/t/t1501-work-tree.sh index 02cf2013fc..9c0bc65250 100755 --- a/t/t1501-work-tree.sh +++ b/t/t1501-work-tree.sh @@ -431,4 +431,16 @@ test_expect_success 'error out gracefully on invalid $GIT_WORK_TREE' ' ) ' +test_expect_success 'refs work with relative gitdir and work tree' ' + git init relative && + git -C relative commit --allow-empty -m one && + git -C relative commit --allow-empty -m two && + + GIT_DIR=relative/.git GIT_WORK_TREE=relative git reset HEAD^ && + + git -C relative log -1 --format=%s >actual && + echo one >expect && + test_cmp expect actual +' + test_done |