3 # Copyright (c) 2007 Johannes E. Schindelin
6 test_description
='git-status'
10 test_expect_success
'setup' '
21 git commit -m initial &&
25 echo 1 > dir1/modified &&
26 echo 2 > dir2/modified &&
27 echo 3 > dir2/added &&
33 # Changes to be committed:
34 # (use "git reset HEAD <file>..." to unstage)
36 # new file: dir2/added
38 # Changed but not updated:
39 # (use "git add <file>..." to update what will be committed)
41 # modified: dir1/modified
44 # (use "git add <file>..." to include in what will be committed)
54 test_expect_success
'status' '
56 git status > output &&
57 git diff expect output
63 # Changes to be committed:
64 # (use "git reset HEAD <file>..." to unstage)
66 # new file: ../dir2/added
68 # Changed but not updated:
69 # (use "git add <file>..." to update what will be committed)
74 # (use "git add <file>..." to include in what will be committed)
84 test_expect_success
'status with relative paths' '
86 (cd dir1 && git status) > output &&
87 git diff expect output
93 # Changes to be committed:
94 # (use "git reset HEAD <file>..." to unstage)
96 # new file: dir2/added
98 # Changed but not updated:
99 # (use "git add <file>..." to update what will be committed)
101 # modified: dir1/modified
104 # (use "git add <file>..." to include in what will be committed)
114 test_expect_success
'status without relative paths' '
116 git config status.relativePaths false
117 (cd dir1 && git status) > output &&
118 git diff expect output