File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- test_description=' git add -u with path limiting
3+ test_description=' git add -u
44
55This test creates a working tree state with three files:
66
@@ -9,7 +9,10 @@ This test creates a working tree state with three files:
99 dir/other (untracked)
1010
1111and issues a git add -u with path limiting on "dir" to add
12- only the updates to dir/sub.'
12+ only the updates to dir/sub.
13+
14+ Also tested are "git add -u" without limiting, and "git add -u"
15+ without contents changes.'
1316
1417. ./test-lib.sh
1518
@@ -85,4 +88,27 @@ test_expect_success 'replace a file with a symlink' '
8588
8689'
8790
91+ test_expect_success ' add everything changed' '
92+
93+ git add -u &&
94+ test -z "$(git diff-files)"
95+
96+ '
97+
98+ test_expect_success ' touch and then add -u' '
99+
100+ touch check &&
101+ git add -u &&
102+ test -z "$(git diff-files)"
103+
104+ '
105+
106+ test_expect_success ' touch and then add explicitly' '
107+
108+ touch check &&
109+ git add check &&
110+ test -z "$(git diff-files)"
111+
112+ '
113+
88114test_done
You can’t perform that action at this time.
0 commit comments