From: "Magnus Bäck" <baeck@swipnet.se>
To: git@vger.kernel.org
Subject: Re: Implementing stat() with FindFirstFile()
Date: Tue, 24 Mar 2009 22:54:16 +0100 [thread overview]
Message-ID: <20090324215416.GB27249@jeeves.jpl.local> (raw)
In-Reply-To: <200903212055.15026.j6t@kdbg.org>
On Saturday, March 21, 2009 at 20:55 CET,
Johannes Sixt <j6t@kdbg.org> wrote:
> On Samstag, 21. März 2009, Magnus Bäck wrote:
>
> > Is there any reason why compat/win32.h uses GetFileAttributesEx()
> > instead of FindFirstFile() to implement the stat() call on Windows?
> > The current implementation requires each queried file to be opened
> > and closed while FindFirstFile() only reads the directory.
>
> There is: File times are extremely important for git. Unfortunately,
> MS's implementation of stat and utime are broken, and they do use
> FindFirstFile(). Read up on the topic here:
>
> http://search.cpan.org/~shay/Win32-UTCFileTime-1.50/lib/Win32/UTCFileTime.pm
Quite interesting, thanks. As it often is, "obvious" changes that
haven't been made aren't that obvious after all.
From what I gather the problematic conversion takes place in the Win32
layer, in which case we might be able to call the ZwQueryDirectoryFile()
kernel routine directly via ntdll.dll to obtain the file times straight
from the file system. Has anyone explored that path, and would it be
acceptable to make such a change?
[...]
--
Magnus Bäck
baeck@swipnet.se
next prev parent reply other threads:[~2009-03-24 22:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 15:47 Implementing stat() with FindFirstFile() Magnus Bäck
2009-03-21 19:55 ` Johannes Sixt
2009-03-24 21:54 ` Magnus Bäck [this message]
2009-03-26 7:15 ` Johannes Sixt
2009-03-26 21:39 ` Magnus Bäck
2009-03-27 2:25 ` Johannes Schindelin
2009-03-29 22:48 ` Magnus Bäck
2009-03-30 0:52 ` Johannes Schindelin
2009-03-30 5:11 ` Björn Steinbrink
2009-03-30 22:07 ` Heiko Voigt
2009-03-30 23:29 ` Johannes Schindelin
2009-03-31 20:32 ` Magnus Bäck
2009-03-31 20:49 ` Johannes Schindelin
2009-04-01 9:28 ` Nazri Ramliy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090324215416.GB27249@jeeves.jpl.local \
--to=baeck@swipnet.se \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).