# [PATCH] git-diff: add a test for git diff --quiet -w

2 messages from 2010-02-22 to 2010-02-22. Participants: Larry D'Anna, Junio C Hamano.
Thread: https://gitlist.dev/t/22743

## Larry D'Anna, 2010-02-22 02:58

Subject: [PATCH] git-diff: add a test for git diff --quiet -w
Message-ID: <1266807524-28487-1-git-send-email-larry@elder-gods.org>
URL: https://gitlist.dev/e/1266807524-28487-1-git-send-email-larry%40elder-gods.org

```
This patch adds two test cases for:

6977c25 git diff --quiet -w: check and report the status

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
---
 t/t4017-diff-retval.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
index 60dd201..14f80ca 100755
--- a/t/t4017-diff-retval.sh
+++ b/t/t4017-diff-retval.sh
@@ -5,6 +5,9 @@ test_description='Return value of diffs'
 . ./test-lib.sh
 
 test_expect_success 'setup' '
+	echo "1 " >a &&
+	git add . &&
+	git commit -m zeroth &&
 	echo 1 >a &&
 	git add . &&
 	git commit -m first &&
@@ -13,6 +16,16 @@ test_expect_success 'setup' '
 	git commit -a -m second
 '
 
+test_expect_success 'git diff --quiet -w  HEAD^^ HEAD^' '
+	git diff --quiet -w HEAD^^ HEAD^
+	test $? = 0
+'
+
+test_expect_success 'git diff --quiet -w  HEAD^ HEAD' '
+	git diff --quiet -w HEAD^ HEAD
+	test $? = 1
+'
+
 test_expect_success 'git diff-tree HEAD^ HEAD' '
 	git diff-tree --exit-code HEAD^ HEAD
 	test $? = 1
-- 
1.7.0.rc2.40.g7d8aa

```

## Junio C Hamano, 2010-02-22 06:03

Subject: Re: [PATCH] git-diff: add a test for git diff --quiet -w
Message-ID: <7vhbp924ej.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vhbp924ej.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1266807524-28487-1-git-send-email-larry@elder-gods.org>

```
Thanks.

```
