From 620a6cd42ed5ea94684b22714181bf03871733dd Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 3 Nov 2007 15:21:21 +0000 Subject: builtin-reset: avoid forking "update-index --refresh" Instead of forking update-index, call refresh_cache() directly. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t7102-reset.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 't/t7102-reset.sh') diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index 506767d2d7..e5c9f30c73 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -418,4 +418,14 @@ test_expect_success 'resetting an unmodified path is a no-op' ' git diff-index --cached --exit-code HEAD ' +cat > expect << EOF +file2: needs update +EOF + +test_expect_success '--mixed refreshes the index' ' + echo 123 >> file2 && + git reset --mixed HEAD > output && + git diff --exit-code expect output +' + test_done -- cgit v1.2.1