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

Re: Windows support

From
David Kastrup <dak@gnu.org>
Date
Jul 26, 2007, 18:13 UTC
Message-ID
<8564478243.fsf@lola.goethe.zz>
In-Reply-To
<fcaeb9bf0707260911y4091b525kc6b89beb82ec7dc7@mail.gmail.com>
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
Show 19 quoted lines
> On 7/26/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> Hi,
>>
>> On Thu, 26 Jul 2007, Nguyen Thai Ngoc Duy wrote:
>>
>> > I make MinGW busybox part of git for some reasons:
>> >
>> > - Making a full MinGW busybox would take lots of time. I don't need
>> > busybox for Windows. What I need is a shell and enough POSIX utilities
>> > to run git shell scripts without any dependencies. Windows users
>> > (including myself when I have to use Windows) hate dependencies.
>>
>> I think that if you succeed to compile ash on MinGW, the rest is easy.
>
> No it's not. With a couple of ifdefs you can compile it fine. Then
> there goes fork(), fcntl(F_DUPFD), /dev/*, job/signal handling...
> Fortunately Git does not use lots of features. It only needs
> /dev/null (and /dev/zero for tests), SIGEXIT and no job usage.. That
> cuts down the effort porting ash.

And here I was tempted to multithread builtin-update-index.c: it is actually quite natural to let one process scan directories non-recursively, stat the files, sort them on a per-directory grain and feed a sorted pseudo-index into a pipeline (recursing to scanning whenever hitting a directory), then let another process/thread do a merge-pass of pseudo-index and real index, immediately writing the output to a new index-to-be. When this is finished and another process invalidated the old index already, reuse the index-to-be as pseudo-index and merge it with the new-index-which-got-in-ahead-of-me.

Would be a fun exercise in particular when merely using (block-buffered!) pipes, and could presumably make a difference on multiprocessor-capable machines.

Anyway, just something that had been spinning in my head. The "streaming merge" idea has the advantage of keeping memory usage low pretty much independently of project size: project memory is pretty much determined by the reader pass since it has to read in a complete directory level before it can sort it and output the next element, and it has to retain the not-yet-output elements of the ancestry.

And it is nice to have some potential for parallel processing. But if it is a lethal stumbling block for Windows... It is conceivable to do the same job instead of with pipes and files with buffers and just switch manually between the directory scanning and merging phases. But it would be less fun.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 42 of 69 in “Windows support”
  1. Dmitry KakurinJul 25, 2007
  2. Johannes SchindelinJul 25, 2007
  3. Asger Ottar AlstrupAug 2, 2007
  4. Johannes SchindelinAug 2, 2007
  5. Steven GrimmJul 25, 2007
  6. Dmitry KakurinJul 26, 2007
  7. Shawn O. PearceJul 26, 2007
  8. Steffen ProhaskaJul 26, 2007
  9. Shawn O. PearceJul 26, 2007
  10. Marius Storm-OlsenJul 26, 2007
  11. Marius Storm-OlsenJul 26, 2007
  12. Steven GrimmJul 26, 2007
  13. Steven GrimmJul 25, 2007
  14. Nguyen Thai Ngoc DuyJul 25, 2007
  15. Johannes SchindelinJul 25, 2007
  16. Nguyen Thai Ngoc DuyJul 25, 2007
  17. Johannes SchindelinJul 25, 2007
  18. Christian MICHONJul 26, 2007
  19. Nguyen Thai Ngoc DuyJul 26, 2007
  20. Christian MICHONJul 26, 2007
  21. Nguyen Thai Ngoc DuyJul 26, 2007
  22. Johannes SixtJul 26, 2007
  23. Dmitry KakurinJul 26, 2007
  24. Junio C HamanoJul 26, 2007
  25. Shawn O. PearceJul 26, 2007
  26. Junio C HamanoJul 26, 2007
  27. Johannes SchindelinJul 26, 2007
  28. Han-Wen NienhuysJul 26, 2007
  29. Johannes SchindelinJul 26, 2007
  30. Han-Wen NienhuysJul 26, 2007
  31. Shawn O. PearceJul 26, 2007
  32. Han-Wen NienhuysJul 26, 2007
  33. Jakub NarebskiJul 26, 2007
  34. Julian PhillipsJul 26, 2007
  35. Nguyen Thai Ngoc DuyJul 26, 2007
  36. Christian MICHONJul 26, 2007
  37. Nguyen Thai Ngoc DuyJul 26, 2007
  38. Johannes SchindelinJul 26, 2007
  39. Nguyen Thai Ngoc DuyJul 26, 2007
  40. Johannes SchindelinJul 26, 2007
  41. Nguyen Thai Ngoc DuyJul 26, 2007
  42. David KastrupJul 26, 2007
  43. Nguyen Thai Ngoc DuyJul 26, 2007
  44. David KastrupJul 26, 2007
  45. Johannes SchindelinJul 26, 2007
  46. Marius Storm-OlsenJul 26, 2007
  47. Nguyen Thai Ngoc DuyJul 26, 2007
  48. Christian MICHONJul 26, 2007
  49. Robin RosenbergJul 26, 2007
  50. Johannes SixtJul 26, 2007
  51. Johannes SchindelinJul 26, 2007
  52. Dmitry KakurinJul 26, 2007
  53. Shawn O. PearceJul 26, 2007
  54. Johannes SchindelinJul 26, 2007
  55. Henning RoggeJul 26, 2007
  56. Andy ParkinsJul 26, 2007
  57. Steffen ProhaskaJul 25, 2007
  58. Noel GrandinJul 25, 2007
  59. Johannes SchindelinJul 26, 2007
  60. Junio C HamanoJul 26, 2007
  61. Stephen CuppettJul 25, 2007
  62. Russ DillJul 25, 2007
  63. Medve Emilian-EMMEDVE1Jul 25, 2007
  64. Russ DillJul 25, 2007
  65. Linus TorvaldsJul 25, 2007
  66. Wincent ColaiutaJul 25, 2007
  67. Marius Storm-OlsenJul 26, 2007
  68. Shawn O. PearceJul 26, 2007
  69. Daniel BarkalowJul 25, 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.