Re: [PATCH v3 06/24] read-cache: Don't compare uid, gid and ino on cygwin
- From
Thomas Gummerer <t.gummerer@gmail.com>
- Date
- Aug 20, 2013, 08:36 UTC
- Message-ID
- <87li3wiwrh.fsf@gmail.com>
- In-Reply-To
- <52114C0E.4030502@ramsay1.demon.co.uk>
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
Show 19 quoted lines
> On 18/08/2013 08:41 PM, Thomas Gummerer wrote:
>> Cygwin doesn't have uid, gid and ino stats fields. Therefore we should
>> never check them in the match_stat_data when working on the CYGWIN
>> platform.
>
> Hmm, this is simply not true ... ;-)
>
> The need to omit the uid, gid and ino fields from the stat checks in
> your original code was caused by the "schizophrenic stat" implementation
> in cygwin. (This was also before "core.checkstat" was implemented; note
> the 'check_stat' conditional below ...)
>
> However, since commit f66450ae ("cygwin: Remove the Win32 l/stat()
> implementation", 22-06-2013), this patch is no longer necessary and
> can simply be dropped from this series.
>
> [I have not had time to read your new patches yet, but I seem to remember
> being concerned about those platforms which have UNRELIABLE_FSTAT set.
> (ie cygwin, MinGW and Windows.)]Ah ok, thanks for the clarification. I misinterpreted your message in the previous thread, thinking it would still be necessary. I'll drop this patch.
I can't recall anything about UNRELIABLE_FSTAT though.
Show 36 quoted lines
> ATB,
> Ramsay Jones
>
>> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
>> ---
>>
>> This patch was not tested on Cygwin yet. I think it's needed though,
>> because the re-reading of the index if it changed will no longer use
>> it's own index_changed function, but use the stat_validity_check
>> function instead. Would be great if someone running Cygwin could test
>> this.
>>
>> read-cache.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/read-cache.c b/read-cache.c
>> index 1f827de..aa17ce7 100644
>> --- a/read-cache.c
>> +++ b/read-cache.c
>> @@ -82,6 +82,7 @@ int match_stat_data(const struct stat_data *sd, struct stat *st)
>> changed |= CTIME_CHANGED;
>> #endif
>>
>> +#if !defined (__CYGWIN__)
>> if (check_stat) {
>> if (sd->sd_uid != (unsigned int) st->st_uid ||
>> sd->sd_gid != (unsigned int) st->st_gid)
>> @@ -89,6 +90,7 @@ int match_stat_data(const struct stat_data *sd, struct stat *st)
>> if (sd->sd_ino != (unsigned int) st->st_ino)
>> changed |= INODE_CHANGED;
>> }
>> +#endif
>>
>> #ifdef USE_STDEV
>> /*
>>