From: Junio C Hamano Date: Fri, 14 Sep 2007 03:54:14 +0000 (-0700) Subject: An additional test for "git-reset -- path" X-Git-Tag: v1.5.4-rc0~434^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cbb390cd8f58ca6fc5c7b2c710425649b057b6d6;p=git.git An additional test for "git-reset -- path" Signed-off-by: Junio C Hamano --- diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index 2cad4db12..f64b1cbf7 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -386,4 +386,20 @@ test_expect_success 'test --mixed ' ' 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