git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add a new lstat and fstat implementation based on Win32 API

From
Marius Storm-Olsen <marius@trolltech.com>
Date
Sep 3, 2007, 13:52 UTC
Message-ID
<46DC1186.2010008@trolltech.com>
In-Reply-To
<Pine.LNX.4.64.0709031428080.28586@racer.site>
Johannes Schindelin said the following on 03.09.2007 15:33:
Show 15 quoted lines
> On Mon, 3 Sep 2007, Marius Storm-Olsen wrote:
>> There was a problem with racy conditions, which this revision fixes.
>> The problem was that fstat was using the builtin implementation, which for
>> for some reason is off by some amount of seconds. (This is probably due to
>> some leap-year issue in one of the implementations. However, Microsoft tells
>> us to use 116444736000000000 in http://support.microsoft.com/kb/167296, so
>> I'll stick with that.)
>> Also, since both stat and lstat proved to be rather slow, having our own
>> version of fstat is probably also wise. At least we now control all the
>> stat'ing, so we _know_ they are compatible.
>> Also note that this revision makes git_lstat call itself after modifying
>> the filename, instead of the builtin stat, for the same reasons.
> 
> At least some of these informations should go into the commit message, 
> too.
Sure
Show 19 quoted lines
>> With the our own implementations of lstat & fstat, the following test cases
>> are now fixed:
>>     t4116-apply-reverte.sh
>>         ok 3: apply in reverse
>>     t4200-rerere.sh
>>         ok 17: young records still live
>> However, the following test cases seems to fail now:
>>     t6024-recursive-merge.sh
>>         FAIL 1: setup tests
>>         FAIL 3: result contains a conflict
>>         FAIL 4: virtual trees were processed
>>         FAIL 5: refuse to merge binaries
>>
>> See attached test case logs.
>> Are some of these test cases unstable, so the result will fluctuate on
>> Windows?
> 
> I saw some funny stuff on Windows, like test cases succeeding when run 
> interactively, but failing when run from "make test".
Ok, I ran 'make test', so maybe that's it? I'll rerun them later.
> BTW it would have been way easier to apply your patch, had you followed 
> SubmittingPatches...

Heh, I actually tried, using the Thunderbird way. Of course the attachments are non-conforming :-) What was the problem? Whitespace issues, Windows EOL, attachments, or all of the above? :-)

> To make it easier on others, I just uploaded it into the "teststat" branch 
> on 4msysgit.git (subject to removal in a few days).
Cool, thanks
> First comment: it seems git_fstat() is not declared properly, so there are 
> quite a few compiler warnings.

/me slaps self. Right, sorry 'bout that. I'll amend the declaration in git-compat-util.h.

> Running the tests now.
Great, thanks!
-- 
.marius
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 46 of 86 in “Stats in Git”
  1. Marius Storm-OlsenSep 2, 2007
  2. Add a new lstat implementation based on Win32 API, and make stat use that implementation too.Marius Storm-Olsen, Sep 2, 2007
  3. Marius Storm-OlsenSep 2, 2007
  4. Reece DunnSep 2, 2007
  5. Marius Storm-OlsenSep 2, 2007
  6. Reece DunnSep 2, 2007
  7. Brian GernhardtSep 2, 2007
  8. Reece DunnSep 2, 2007
  9. Marius Storm-OlsenSep 2, 2007
  10. Johannes SchindelinSep 2, 2007
  11. David KastrupSep 2, 2007
  12. Marius Storm-OlsenSep 2, 2007
  13. Johannes SixtSep 2, 2007
  14. Marius Storm-OlsenSep 2, 2007
  15. Johannes SixtSep 2, 2007
  16. Add a new lstat implementation based on Win32 API, and make stat use that implementation too.Marius Storm-Olsen, Sep 2, 2007
  17. Robin RosenbergSep 2, 2007
  18. Johannes SchindelinSep 2, 2007
  19. Robin RosenbergSep 2, 2007
  20. Johannes SchindelinSep 2, 2007
  21. Johannes SixtSep 3, 2007
  22. Miklos VajnaSep 3, 2007
  23. David KastrupSep 3, 2007
  24. Miklos VajnaSep 5, 2007
  25. David KastrupSep 5, 2007
  26. Miklos VajnaSep 6, 2007
  27. David KastrupSep 6, 2007
  28. Douglas StockwellSep 6, 2007
  29. David KastrupSep 7, 2007
  30. Alex RiesenSep 2, 2007
  31. Robin RosenbergSep 2, 2007
  32. Marius Storm-OlsenSep 3, 2007
  33. Johannes SchindelinSep 3, 2007
  34. David KastrupSep 3, 2007
  35. Marius Storm-OlsenSep 3, 2007
  36. Johannes SchindelinSep 3, 2007
  37. Alex RiesenSep 2, 2007
  38. Marius Storm-OlsenSep 3, 2007
  39. Johannes SixtSep 3, 2007
  40. Marius Storm-OlsenSep 3, 2007
  41. Alex RiesenSep 2, 2007
  42. Marius Storm-OlsenSep 2, 2007
  43. Matthieu MoySep 3, 2007
  44. Marius Storm-OlsenSep 3, 2007
  45. Johannes SchindelinSep 3, 2007
  46. Marius Storm-OlsenSep 3, 2007
  47. Johannes SchindelinSep 3, 2007
  48. Marius Storm-OlsenSep 3, 2007
  49. Johannes SchindelinSep 3, 2007
  50. Johannes SixtSep 3, 2007
  51. Johannes SchindelinSep 3, 2007
  52. Marius Storm-OlsenSep 3, 2007
  53. Johannes SchindelinSep 4, 2007
  54. Johannes SixtSep 4, 2007
  55. David KastrupSep 4, 2007
  56. Marius Storm-OlsenSep 4, 2007
  57. Johannes SixtSep 4, 2007
  58. Marius Storm-OlsenSep 4, 2007
  59. Johannes SixtSep 4, 2007
  60. David KastrupSep 4, 2007
  61. Johannes SchindelinSep 4, 2007
  62. Johannes SixtSep 4, 2007
  63. Marius Storm-OlsenSep 4, 2007
  64. Marius Storm-OlsenSep 4, 2007
  65. Johannes SixtSep 4, 2007
  66. Johannes SchindelinSep 4, 2007
  67. Johannes SixtSep 4, 2007
  68. Johannes SchindelinSep 4, 2007
  69. Johannes SchindelinSep 4, 2007
  70. Marius Storm-OlsenSep 4, 2007
  71. Johannes SchindelinSep 4, 2007
  72. David KastrupSep 4, 2007
  73. Marius Storm-OlsenSep 4, 2007
  74. Johannes SchindelinSep 4, 2007
  75. Johannes SchindelinSep 4, 2007
  76. Rutger NijlunsingSep 4, 2007
  77. Reece DunnSep 4, 2007
  78. Marius Storm-OlsenSep 5, 2007
  79. Johannes SchindelinSep 5, 2007
  80. Johannes SixtSep 4, 2007
  81. Johannes SixtSep 6, 2007
  82. Marius Storm-OlsenSep 6, 2007
  83. Johannes SixtSep 3, 2007
  84. Johannes SchindelinSep 3, 2007
  85. Marius Storm-OlsenSep 3, 2007
  86. Johannes SchindelinSep 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.