interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / t1009-read-tree-new-index.sh

28 lines · 510 bytes Raw Blame History
1#!/bin/sh
2
3test_description='test read-tree into a fresh index file'
4
5GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8. ./test-lib.sh
9
10test_expect_success setup '
11 echo one >a &&
12 git add a &&
13 git commit -m initial
14'
15
16test_expect_success 'non-existent index file' '
17 rm -f new-index &&
18 GIT_INDEX_FILE=new-index git read-tree main
19'
20
21test_expect_success 'empty index file' '
22 rm -f new-index &&
23 > new-index &&
24 GIT_INDEX_FILE=new-index git read-tree main
25'
26
27test_done
28