# Gitk/Cygwin bug: phony local changes

4 messages from 2008-10-27 to 2008-10-28. Participants: Hannu Koivisto, Alex Riesen.
Thread: https://gitlist.dev/t/16060

## Hannu Koivisto, 2008-10-27 15:22

Subject: Gitk/Cygwin bug: phony local changes
Message-ID: <83bpx62hbn.fsf@kalahari.s2.org>
URL: https://gitlist.dev/e/83bpx62hbn.fsf%40kalahari.s2.org

```
Greetings,

git clone git://git.kernel.org/pub/scm/git/git.git
cd git
gitk

with Cygwin build of git version 1.6.0.3.523.g304d0 in Windows XP
SP2 with Cygwin dll version 1.5.24 results to gitk showing "Local
uncommitted changes, not checked in to index" entry in the history
tree and if I select that entry, it seems to indicate that all
files have changed but without any actual content changes.

git status doesn't show any changes.

If I run git diff (which displays no changes) or git reset and then
run gitk again, there is no longer that "Local uncommitted
changes..." entry.

Since it was suggested on #irc, I tried "git config --global
core.trustctime false" but that didn't help, which I suppose was
expected since the documentation talks about differences between
the index and the working copy and I haven't added anything to the
index.

I can reproduce this problem with another (private) repository as
well.

-- 
Hannu

```

## Hannu Koivisto, 2008-10-28 15:12

Subject: Re: Gitk/Cygwin bug: phony local changes
Message-ID: <837i7s3ga4.fsf@kalahari.s2.org>
URL: https://gitlist.dev/e/837i7s3ga4.fsf%40kalahari.s2.org
In-Reply-To: <83bpx62hbn.fsf@kalahari.s2.org>

```
Hannu Koivisto <azure@iki.fi> writes:

> Greetings,
>
> git clone git://git.kernel.org/pub/scm/git/git.git
> cd git
> gitk
>
> with Cygwin build of git version 1.6.0.3.523.g304d0 in Windows XP
> SP2 with Cygwin dll version 1.5.24 results to gitk showing "Local
> uncommitted changes, not checked in to index" entry in the history
> tree and if I select that entry, it seems to indicate that all
> files have changed but without any actual content changes.
>
> git status doesn't show any changes.
>
> If I run git diff (which displays no changes) or git reset and then
> run gitk again, there is no longer that "Local uncommitted
> changes..." entry.
>
> Since it was suggested on #irc, I tried "git config --global
> core.trustctime false" but that didn't help, which I suppose was
> expected since the documentation talks about differences between
> the index and the working copy and I haven't added anything to the
> index.
>
> I can reproduce this problem with another (private) repository as
> well.

I used bisect to find which commit introduced this bug and the
result is:

7faee6b8de836904227ee98dc3d2c4c75b0ef3a1 is first bad commit
commit 7faee6b8de836904227ee98dc3d2c4c75b0ef3a1
Author: Mark Levedahl <mlevedahl@gmail.com>
Date:   Mon Oct 13 00:33:31 2008 -0400

    compat/cygwin.c - Use cygwin's stat if core.filemode == true

    Cygwin's POSIX emulation allows use of core.filemode true, unlike native
    Window's implementation of stat / lstat, and Cygwin/git users who have
    configured core.filemode true in various repositories will be very
    unpleasantly surprised to find that git is no longer honoring that option.
    So, this patch forces use of Cygwin's stat functions if core.filemode is
    set true, regardless of any other considerations.
   
    Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

:040000 040000 8cbed462649839a444f63c54ddc5b1a0fb5eed8e 4dab6846ae35f2c5d2971d5810c30b39278c7060 M      Documentation
:040000 040000 f64d96b06609aadc586fa4312a57900c911779df cbf9743456a38bb3584e48e27d4659e8ec3b0be4 M      compat

-- 
Hannu

```

## Alex Riesen, 2008-10-28 15:27

Subject: Re: Gitk/Cygwin bug: phony local changes
Message-ID: <81b0412b0810280827o2ccca3bfw127877782f5a0909@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0810280827o2ccca3bfw127877782f5a0909%40mail.gmail.com
In-Reply-To: <837i7s3ga4.fsf@kalahari.s2.org>

```
2008/10/28 Hannu Koivisto <azure@iki.fi>:

> I used bisect to find which commit introduced this bug and the
> result is:
>
> 7faee6b8de836904227ee98dc3d2c4c75b0ef3a1 is first bad commit
> commit 7faee6b8de836904227ee98dc3d2c4c75b0ef3a1
> Author: Mark Levedahl <mlevedahl@gmail.com>
> Date:   Mon Oct 13 00:33:31 2008 -0400
>
>    compat/cygwin.c - Use cygwin's stat if core.filemode == true
>

Could you try the patch from Junio's "Re: [PATCH] Only update the
cygwin-related configuration during state auto-setup" mail and see
if it changes anything?

```

## Hannu Koivisto, 2008-10-28 16:04

Subject: Re: Gitk/Cygwin bug: phony local changes
Message-ID: <831vy03dui.fsf@kalahari.s2.org>
URL: https://gitlist.dev/e/831vy03dui.fsf%40kalahari.s2.org
In-Reply-To: <81b0412b0810280827o2ccca3bfw127877782f5a0909@mail.gmail.com>

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

> 2008/10/28 Hannu Koivisto <azure@iki.fi>:
>
>> I used bisect to find which commit introduced this bug and the
>> result is:
>>
>> 7faee6b8de836904227ee98dc3d2c4c75b0ef3a1 is first bad commit
>> commit 7faee6b8de836904227ee98dc3d2c4c75b0ef3a1
>> Author: Mark Levedahl <mlevedahl@gmail.com>
>> Date:   Mon Oct 13 00:33:31 2008 -0400
>>
>>    compat/cygwin.c - Use cygwin's stat if core.filemode == true
>>
>
> Could you try the patch from Junio's "Re: [PATCH] Only update the
> cygwin-related configuration during state auto-setup" mail and see
> if it changes anything?

It seems to fix the problem.

Something I forgot to mention in the previous mail: the problem
occurs whether I have core.fileMode set to true or false.

-- 
Hannu

```
