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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alex Riesen <raa.lkml@xxxxxxxxx> writes:

> David Kastrup, Thu, Aug 23, 2007 23:14:20 +0200:
>> Alex Riesen <raa.lkml@xxxxxxxxx> writes:
>> 
>> > David Kastrup, Wed, Aug 22, 2007 19:17:16 +0200:
>> >> Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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.

>> > 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux