tvl-depot/t/t1009-read-tree-new-index.sh
Vincent Ambo 1b593e1ea4 Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git
git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
2020-01-11 23:36:56 +00:00

25 lines
427 B
Bash
Executable file

#!/bin/sh
test_description='test read-tree into a fresh index file'
. ./test-lib.sh
test_expect_success setup '
echo one >a &&
git add a &&
git commit -m initial
'
test_expect_success 'non-existent index file' '
rm -f new-index &&
GIT_INDEX_FILE=new-index git read-tree master
'
test_expect_success 'empty index file' '
rm -f new-index &&
> new-index &&
GIT_INDEX_FILE=new-index git read-tree master
'
test_done