Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:30

Alex Riesen [off-list ref] writes:
David Kastrup, Thu, Aug 23, 2007 23:14:20 +0200:
quoted
Alex Riesen [off-list ref] writes:
quoted
David Kastrup, Wed, Aug 22, 2007 19:17:16 +0200:
quoted
Johannes Schindelin [off-list ref] writes:
quoted
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.
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help