diff mbox series

[05/10] t1401: make invocation of tar(1) work with Win32-provided one

Message ID d082cd92af36610af24985ef2279c4176b1f182f.1728906490.git.ps@pks.im (mailing list archive)
State Superseded
Headers show
Series Platform compatibility fixes | expand

Commit Message

Patrick Steinhardt Oct. 14, 2024, 12:21 p.m. UTC
Windows nowadays provides a tar(1) binary in "C:\Windows\system32". This
version of tar(1) doesn't seem to handle the case where directory paths
end with a trailing forward slash. And as we do that in t1401 the result
is that the test fails.

Drop the trailing slash. Other tests that use tar(1) work alright, this
is the only instance where it has been failing.
---
 t/t1401-symbolic-ref.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Sunshine Oct. 14, 2024, 11:23 p.m. UTC | #1
On Mon, Oct 14, 2024 at 8:21 AM Patrick Steinhardt <ps@pks.im> wrote:
> Windows nowadays provides a tar(1) binary in "C:\Windows\system32". This
> version of tar(1) doesn't seem to handle the case where directory paths
> end with a trailing forward slash. And as we do that in t1401 the result
> is that the test fails.
>
> Drop the trailing slash. Other tests that use tar(1) work alright, this
> is the only instance where it has been failing.
> ---

Missing sign-off.
Taylor Blau Oct. 15, 2024, 12:29 a.m. UTC | #2
On Mon, Oct 14, 2024 at 07:23:29PM -0400, Eric Sunshine wrote:
> On Mon, Oct 14, 2024 at 8:21 AM Patrick Steinhardt <ps@pks.im> wrote:
> > Windows nowadays provides a tar(1) binary in "C:\Windows\system32". This
> > version of tar(1) doesn't seem to handle the case where directory paths
> > end with a trailing forward slash. And as we do that in t1401 the result
> > is that the test fails.
> >
> > Drop the trailing slash. Other tests that use tar(1) work alright, this
> > is the only instance where it has been failing.
> > ---
>
> Missing sign-off.

Very good catch. It sounds like we will see a reroll of this series,
then.

Thanks,
Taylor
diff mbox series

Patch

diff --git a/t/t1401-symbolic-ref.sh b/t/t1401-symbolic-ref.sh
index 5c60d6f812d..90af3f955c0 100755
--- a/t/t1401-symbolic-ref.sh
+++ b/t/t1401-symbolic-ref.sh
@@ -16,7 +16,7 @@  reset_to_sane() {
 test_expect_success 'setup' '
 	git symbolic-ref HEAD refs/heads/foo &&
 	test_commit file &&
-	"$TAR" cf .git.tar .git/
+	"$TAR" cf .git.tar .git
 '
 
 test_expect_success 'symbolic-ref read/write roundtrip' '