t1404: do not rely on the exact phrasing of strerror()
authorJunio C Hamano <gitster@pobox.com>
Thu, 14 Feb 2019 20:16:20 +0000 (12:16 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Feb 2019 20:17:38 +0000 (12:17 -0800)
Not even in C locale, it is wrong to expect that the exact phrasing
"File exists" is used to show EEXIST.

Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
Helped-by: Duy Nguyen <pclouds@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1404-update-ref-errors.sh
index 3a887b511340b50a0cadcf1968a8c0986d67d66c..482d24fa09ad0d0c92e7bdfec1fc51575d0ddd3e 100755 (executable)
@@ -614,7 +614,7 @@ test_expect_success 'delete fails cleanly if packed-refs file is locked' '
        test_when_finished "rm -f .git/packed-refs.lock" &&
        test_must_fail git update-ref -d $prefix/foo >out 2>err &&
        git for-each-ref $prefix >actual &&
-       test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: File exists" err &&
+       test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: " err &&
        test_cmp unchanged actual
 '