Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
An additional test for "git-reset -- path"
author
Junio C Hamano
<gitster@pobox.com>
Fri, 14 Sep 2007 03:54:14 +0000
(20:54 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 14 Sep 2007 03:54:14 +0000
(20:54 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7102-reset.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
0e5a7fa
)
diff --git
a/t/t7102-reset.sh
b/t/t7102-reset.sh
index 2cad4db127a9df9f8550887c6b46851335a1f3d8..f64b1cbf75e82c22efc80dc817c340feb036a752 100755
(executable)
--- a/
t/t7102-reset.sh
+++ b/
t/t7102-reset.sh
@@
-386,4
+386,20
@@
test_expect_success 'test --mixed <paths>' '
git diff output cached_expect
'
+test_expect_success 'test resetting the index at give paths' '
+
+ mkdir sub &&
+ >sub/file1 &&
+ >sub/file2 &&
+ git update-index --add sub/file1 sub/file2 &&
+ T=$(git write-tree) &&
+ ! git reset HEAD sub/file2 &&
+ U=$(git write-tree) &&
+ echo "$T" &&
+ echo "$U" &&
+ ! git diff-index --cached --exit-code "$T" &&
+ test "$T" != "$U"
+
+'
+
test_done