t4038: Remove non-portable '-a' option passed to test_cmp
diff mbox series

Message ID 20190920220601.8090-1-cb@hashpling.org
State New
Headers show
Series
  • t4038: Remove non-portable '-a' option passed to test_cmp
Related show

Commit Message

CB Bailey Sept. 20, 2019, 10:06 p.m. UTC
From: CB Bailey <cbailey32@bloomberg.net>

Signed-off-by: CB Bailey <cbailey32@bloomberg.net>
---
 t/t4038-diff-combined.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Elijah Newren Sept. 23, 2019, 4:52 p.m. UTC | #1
On Fri, Sep 20, 2019 at 3:07 PM CB Bailey <cb@hashpling.org> wrote:
>
> From: CB Bailey <cbailey32@bloomberg.net>
>
> Signed-off-by: CB Bailey <cbailey32@bloomberg.net>
> ---
>  t/t4038-diff-combined.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
> index d4afe12554..b9d876efa2 100755
> --- a/t/t4038-diff-combined.sh
> +++ b/t/t4038-diff-combined.sh
> @@ -509,7 +509,7 @@ test_expect_success FUNNYNAMES '--combined-all-paths and --raw and funny names'
>  test_expect_success FUNNYNAMES '--combined-all-paths and --raw -and -z and funny names' '
>         printf "aaf8087c3cbd4db8e185a2d074cf27c53cfb75d7\0::100644 100644 100644 f00c965d8307308469e537302baa73048488f162 088bd5d92c2a8e0203ca8e7e4c2a5c692f6ae3f7 333b9c62519f285e1854830ade0fe1ef1d40ee1b RR\0file\twith\ttabs\0i\tam\ttabbed\0fickle\tnaming\0" >expect &&
>         git diff-tree -c -M --raw --combined-all-paths -z HEAD >actual &&
> -       test_cmp -a expect actual
> +       test_cmp expect actual
>  '

This will mean slightly less useful diagnostic output should the test
ever fail on a platform that does support diff -a, but that's a small
price to pay to make sure the test is portable.  If anyone does ever
see this test fail, they can go in and inspect further themselves.

Thanks for the fix.

Patch
diff mbox series

diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index d4afe12554..b9d876efa2 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -509,7 +509,7 @@  test_expect_success FUNNYNAMES '--combined-all-paths and --raw and funny names'
 test_expect_success FUNNYNAMES '--combined-all-paths and --raw -and -z and funny names' '
 	printf "aaf8087c3cbd4db8e185a2d074cf27c53cfb75d7\0::100644 100644 100644 f00c965d8307308469e537302baa73048488f162 088bd5d92c2a8e0203ca8e7e4c2a5c692f6ae3f7 333b9c62519f285e1854830ade0fe1ef1d40ee1b RR\0file\twith\ttabs\0i\tam\ttabbed\0fickle\tnaming\0" >expect &&
 	git diff-tree -c -M --raw --combined-all-paths -z HEAD >actual &&
-	test_cmp -a expect actual
+	test_cmp expect actual
 '
 
 test_expect_success FUNNYNAMES '--combined-all-paths and --cc and funny names' '