diff options
author | Greg Bacon <gbacon@dbresearch.net> | 2009-11-19 15:12:24 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-20 22:00:36 -0800 |
commit | 3e97c7c6af2901cec63bf35fcd43ae3472e24af8 (patch) | |
tree | e71fd65ec0cd0c2b1150f1e48571795a444f1388 /t | |
parent | e36e6c00cd60130f8792319a5aa0f56d2da68e14 (diff) | |
download | git-3e97c7c6af2901cec63bf35fcd43ae3472e24af8.tar.gz git-3e97c7c6af2901cec63bf35fcd43ae3472e24af8.tar.xz |
No diff -b/-w output for all-whitespace changes
Change git-diff's whitespace-ignoring modes to generate
output only if a non-empty patch results, which git-apply
rejects.
Update the tests to look for the new behavior.
Signed-off-by: Greg Bacon <gbacon@dbresearch.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index 8dd147d78..90f334237 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -93,8 +93,6 @@ git diff > out test_expect_success 'another test, without options' 'test_cmp expect out' cat << EOF > expect -diff --git a/x b/x -index d99af23..8b32fb5 100644 EOF git diff -w > out test_expect_success 'another test, with -w' 'test_cmp expect out' @@ -386,6 +384,18 @@ test_expect_success 'checkdiff allows new blank lines' ' git diff --check ' +cat <<EOF >expect +EOF +test_expect_success 'whitespace-only changes not reported' ' + git reset --hard && + echo >x "hello world" && + git add x && + git commit -m "hello 1" && + echo >x "hello world" && + git diff -b >actual && + test_cmp expect actual +' + test_expect_success 'combined diff with autocrlf conversion' ' git reset --hard && |