git-remote: list branches in vertical lists
[git/dscho.git] / t / t2203-add-intent.sh
blobd4de35ea067c4a7c3a9a46ceac57f4cf1086a19a
1 #!/bin/sh
3 test_description='Intent to add'
5 . ./test-lib.sh
7 test_expect_success 'intent to add' '
8 echo hello >file &&
9 echo hello >elif &&
10 git add -N file &&
11 git add elif
14 test_expect_success 'check result of "add -N"' '
15 git ls-files -s file >actual &&
16 empty=$(git hash-object --stdin </dev/null) &&
17 echo "100644 $empty 0 file" >expect &&
18 test_cmp expect actual
21 test_expect_success 'intent to add is just an ordinary empty blob' '
22 git add -u &&
23 git ls-files -s file >actual &&
24 git ls-files -s elif | sed -e "s/elif/file/" >expect &&
25 test_cmp expect actual
28 test_expect_success 'intent to add does not clobber existing paths' '
29 git add -N file elif &&
30 empty=$(git hash-object --stdin </dev/null) &&
31 git ls-files -s >actual &&
32 ! grep "$empty" actual
35 test_done