# [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

6 messages from 2009-02-11 to 2009-02-11. Participants: Alex Riesen, Junio C Hamano, Johannes Sixt.
Thread: https://gitlist.dev/t/17720

## Alex Riesen, 2009-02-11 09:51

Subject: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support
Message-ID: <81b0412b0902110151x35fbbb4esb9efefae2e1fe90a@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0902110151x35fbbb4esb9efefae2e1fe90a%40mail.gmail.com

```
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

I'm honestly sorry for my contributions. They seem to be exclusively
in the "make Git work in Windows" area.  Depressing.

 t/t3400-rebase.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


From f41b99bbdf10249c0dfcb54545709f0a8dd00484 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Wed, 11 Feb 2009 10:45:43 +0100
Subject: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 t/t3400-rebase.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 8c0c5f5..a229276 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -70,6 +70,10 @@ test_expect_success \
      test 3 = $(git rev-list master.. | wc -l)
 '
 
+if test "$(git config --bool core.filemode)" = false
+then
+    say 'skipping rebase filemode tests (no filesystem support)'
+else
 test_expect_success 'rebase a single mode change' '
      git checkout master &&
      echo 1 > X &&
@@ -94,5 +98,6 @@ test_expect_success 'Show verbose error when HEAD could not be detached' '
      test_must_fail git rebase topic 2> output.err > output.out &&
      grep "Untracked working tree file .B. would be overwritten" output.err
 '
+fi
 
 test_done
-- 
1.6.2.rc0.28.g1f0fe8


```

## Junio C Hamano, 2009-02-11 10:09

Subject: Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support
Message-ID: <7v7i3xgu9v.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v7i3xgu9v.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <81b0412b0902110151x35fbbb4esb9efefae2e1fe90a@mail.gmail.com>

```
Alex Riesen <raa.lkml@gmail.com> writes:

> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
>
> I'm honestly sorry for my contributions. They seem to be exclusively
> in the "make Git work in Windows" area.  Depressing.
>
>  t/t3400-rebase.sh |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

I wonder if you should be fixing the tests with "update-index --chmod"
instead...

```

## Johannes Sixt, 2009-02-11 10:09

Subject: Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support
Message-ID: <4992A3DF.4010707@viscovery.net>
URL: https://gitlist.dev/e/4992A3DF.4010707%40viscovery.net
In-Reply-To: <81b0412b0902110151x35fbbb4esb9efefae2e1fe90a@mail.gmail.com>

```
Alex Riesen schrieb:
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
> 
> I'm honestly sorry for my contributions. They seem to be exclusively
> in the "make Git work in Windows" area.  Depressing.
> 
>  t/t3400-rebase.sh |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

Very interesting. This test works unmodified here. On the other hand, I
have to skip the entire t4129-apply-samemode.sh.

-- Hannes

```

## Alex Riesen, 2009-02-11 10:53

Subject: Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support
Message-ID: <81b0412b0902110253g2288419eha4037f22f6286ea4@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0902110253g2288419eha4037f22f6286ea4%40mail.gmail.com
In-Reply-To: <4992A3DF.4010707@viscovery.net>

```
2009/2/11 Johannes Sixt <j.sixt@viscovery.net>:
> Alex Riesen schrieb:
>>
>> I'm honestly sorry for my contributions. They seem to be exclusively
>> in the "make Git work in Windows" area.  Depressing.
>>
>>  t/t3400-rebase.sh |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> Very interesting. This test works unmodified here. On the other hand, I
> have to skip the entire t4129-apply-samemode.sh.
>

hmm... These seem to work here. I have to use Cygwin. Do you use the
native port?

```

## Alex Riesen, 2009-02-11 11:05

Subject: Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support
Message-ID: <81b0412b0902110305o5ca60708gc07cbc9ae1d89d1f@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0902110305o5ca60708gc07cbc9ae1d89d1f%40mail.gmail.com
In-Reply-To: <7v7i3xgu9v.fsf@gitster.siamese.dyndns.org>

```
2009/2/11 Junio C Hamano <gitster@pobox.com>:
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
>> ---
>>
>> I'm honestly sorry for my contributions. They seem to be exclusively
>> in the "make Git work in Windows" area.  Depressing.
>>
>>  t/t3400-rebase.sh |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> I wonder if you should be fixing the tests with "update-index --chmod"
> instead...
>

Well, mostly these should work independent of the filesystem (except
for the cases when the index is checked out later). They seem to, and
they look like they should, too. See t4014-format-patch, for one.

But you're right. I should have reviewed them earlier. Anyway, there is
not many tests which have "--chmod" in them:
t4006-diff-mode.sh, t4014-format-patch.sh, t6031-merge-recursive.sh,
and t9500-gitweb-standalone-no-errors.sh.
The t4006 does not bother to look at working tree (good),
t4014 is good (looks like its ignoring modes altogether),
t6031 uses --chmod to augment the chmod useless on FAT-like fs
(seem to be an earlier fix for the same problem).

What's more interesting is the use of chmod for index mode change purpose,
which should be reviewed regularly (and I do that only when it breaks.
Lazy boom, I am...)

```

## Johannes Sixt, 2009-02-11 11:30

Subject: Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support
Message-ID: <4992B6C5.3010609@viscovery.net>
URL: https://gitlist.dev/e/4992B6C5.3010609%40viscovery.net
In-Reply-To: <81b0412b0902110253g2288419eha4037f22f6286ea4@mail.gmail.com>

```
Alex Riesen schrieb:
> 2009/2/11 Johannes Sixt <j.sixt@viscovery.net>:
>> Alex Riesen schrieb:
>>> I'm honestly sorry for my contributions. They seem to be exclusively
>>> in the "make Git work in Windows" area.  Depressing.
>>>
>>>  t/t3400-rebase.sh |    5 +++++
>>>  1 files changed, 5 insertions(+), 0 deletions(-)
>> Very interesting. This test works unmodified here. On the other hand, I
>> have to skip the entire t4129-apply-samemode.sh.
>>
> 
> hmm... These seem to work here. I have to use Cygwin. Do you use the
> native port?

Yes. And the reason why the test does not fail here is because the mode
change is outright ignored, and the test doesn't check whether the result
meets the expectations.

-- Hannes

```
