Thread (37 messages) flat view 37 messages, 10 authors, 2016-06-15

Re: [PATCH] Add a new lstat implementation based on Win32 API, and make stat use that implementation too.

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:43:32

Marius Storm-Olsen schrieb:
This gives us a significant speedup when adding, committing and stat'ing files.
(Also, since Windows doesn't really handle symlinks, it's fine that stat just uses lstat)
Unfortunately, the patch fails t0010-racy-git.sh. I suspect the filetime 
conversion:
-int lstat(const char *file_name, struct stat *buf)
+static inline time_t filetime_to_time_t(const FILETIME *ft)
+{
+	long long winTime = ((long long)ft->dwHighDateTime << 32) + ft->dwLowDateTime;
+	winTime -= 116444736000000000LL; /* Windows to Unix Epoch conversion */
+	winTime /= 10000000;		 /* Nano to seconds resolution */
Shouldn't this be 1000000000 according to your comment? However, even if 
I make that change, the test still fails. Could you please look into this?
+	return (time_t)winTime;
+}
-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help