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

Re: [PATCH] Make "git reset" a builtin. (incomplete)

From
David Kastrup <dak@gnu.org>
Date
Aug 23, 2007, 22:05 UTC
Message-ID
<85r6lthppj.fsf@lola.goethe.zz>
In-Reply-To
<20070823213337.GC3516@steel.home>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 30 quoted lines
> David Kastrup, Thu, Aug 23, 2007 23:14:20 +0200:
>> Alex Riesen <raa.lkml@gmail.com> writes:
>> 
>> > David Kastrup, Wed, Aug 22, 2007 19:17:16 +0200:
>> >> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> >> > And not making the scripts builtins helps Windows users how,
>> >> > exactly?
>> >> 
>> >> Red herring.  The proposal was not to do nothing, but rather give git
>> >> a dedicated scripting language internal to it.  Two suggestions of
>> >> mine with different advantages were git-busybox and Lua.
>> >
>> > Different "disadvantages". How do you do pipes and safe
>> > inter-program argument passing in Lua? Portably?
>> 
>> Argument quoting would have to depend on the system.  If you implement
>> that, you should be able to use os.popen and os.system.  However, the
>> general Lua approach would be to write wrappers around C routines
>> dealing with the basic git data structures, giving you things like an
>> iterator over the index and similar.  One would usually not call
>> executables, but rather functions from a git-specific library.
>> 
>> Instead of stringing this stuff together with pipes, one would string
>> it together using coroutines (Lua "threads" are strictly synchronous,
>> about as fast as normal function calls, and a yield/resume rendezvous
>> passes a value together with control).
>> 
>> So pipes would not be a natural building block, anyway.
>
> Now that'll be a mess.

Huh? Stringing executables together with pipes is quite the same control flow as stringing coroutines together (except that coroutines can pass values bidirectionally). You just write "resume" instead of "write" on the data producing side, and "yield" instead of "read" on the data consuming side.

Show 8 quoted lines
>> > What do you propose to do about gitbox becoming a dependency for
>> > others, who inevitably start using it (why not? It promised to be
>> > portable enough for Git itself!)
>> 
>> I don't understand what you mean here.
>
> Git gets a script language support. People use the script outside of
> git and whine when it breaks or gets removed.
I don't see the problem.
-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Previous: Alex RiesenNext: Nicolas Pitre
Message 36 of 49 in “Make "git reset" a builtin. (incomplete)”
  1. Make "git reset" a builtin. (incomplete)Carlos Rica, Aug 22, 2007
  2. David KastrupAug 22, 2007
  3. Andreas EricssonAug 22, 2007
  4. David KastrupAug 22, 2007
  5. Mike HommeyAug 22, 2007
  6. Chris ShoemakerAug 22, 2007
  7. David KastrupAug 22, 2007
  8. Nicolas PitreAug 22, 2007
  9. Johannes SchindelinAug 22, 2007
  10. David KastrupAug 22, 2007
  11. Linus TorvaldsAug 22, 2007
  12. David KastrupAug 22, 2007
  13. Linus TorvaldsAug 22, 2007
  14. David KastrupAug 22, 2007
  15. Linus TorvaldsAug 22, 2007
  16. David KastrupAug 22, 2007
  17. Linus TorvaldsAug 23, 2007
  18. Wincent ColaiutaAug 23, 2007
  19. Nicolas PitreAug 23, 2007
  20. Jon SmirlAug 23, 2007
  21. Linus TorvaldsAug 23, 2007
  22. Junio C HamanoAug 23, 2007
  23. Johannes SchindelinAug 23, 2007
  24. Reece DunnAug 22, 2007
  25. Johannes SchindelinAug 23, 2007
  26. Theodore TsoAug 23, 2007
  27. Johannes SchindelinAug 23, 2007
  28. David TweedAug 23, 2007
  29. Theodore TsoAug 23, 2007
  30. Johannes SchindelinAug 23, 2007
  31. Jon SmirlAug 23, 2007
  32. Reece DunnAug 23, 2007
  33. Alex RiesenAug 23, 2007
  34. David KastrupAug 23, 2007
  35. Alex RiesenAug 23, 2007
  36. David KastrupAug 23, 2007
  37. Nicolas PitreAug 22, 2007
  38. Johannes SchindelinAug 23, 2007
  39. Nicolas PitreAug 23, 2007
  40. Reece DunnAug 22, 2007
  41. Johannes SchindelinAug 23, 2007
  42. Robin RosenbergAug 23, 2007
  43. Nguyen Thai Ngoc DuyAug 23, 2007
  44. Matthieu MoyAug 22, 2007
  45. David KastrupAug 22, 2007
  46. Andy ParkinsAug 22, 2007
  47. Johannes SixtAug 22, 2007
  48. Alex RiesenAug 22, 2007
  49. Johannes SchindelinAug 23, 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.