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

Re: [PATCH/RFC 0/7] Support for Ruby

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 23, 2013, 00:00 UTC
Message-ID
<CAPc5daWa0BPXdrYqek=WzixVVfh0DvHhxjtOh2LW6bgR0MAOPw@mail.gmail.com>
In-Reply-To
<20130921235647.GC235845@vauxhall.crustytoothpaste.net>

[on vacaion, with only gmail webmail UI; please excuse me if this message comes out badly formatted or gets dropped by vger.kernel.org]

On Sat, Sep 21, 2013 at 4:56 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 7 quoted lines
> On Sat, Sep 21, 2013 at 05:52:05PM -0500, Felipe Contreras wrote:
>> On Sat, Sep 21, 2013 at 4:29 PM, brian m. carlson
>> <sandals@crustytoothpaste.net> wrote:
>> > As Junio has also pointed out in the past, there are people who aren't
>> > able to use Ruby in the same way that they are Perl and Python.  If it's
>> > announced now, Git 2.0 might be a good time to start accepting Ruby
>> > scripts, as that will give people time to plan for its inclusion.

In the very beginning, the codebase and development community of Git was very small. In order to give usability and also easy availability of minimally sufficient features, we used shell and Perl for quicker turn-around and implementation and included these Porcelain scripts written in higher level languages in the same package as the core Git.

We should look at use of shell and Perl as necessary evil in that context, not as an enabler for people who do not want to write in C. It is no longer 2005 and the "enabler" side has a much more suited project for it these days.

Namely, it is better served by various language-binding efforts around libgit2. Binding that takes advantage of each specific language is better done over there, I think. Cf. http://www.youtube.com/watch?v=4ZWqr6iih3s

If anything, I think the core side should be focused on three things (in addition to bug-fixes, of course) in the longer term:

 - Defining and implementing necessary improvements to the core on-file and
   on-the-wire data structures and the protocols to serve as the canonical
   implementation.
 - Moving away from higher-level scripting languages such as shell and Perl.
   Recent "clean --interactive" may have added some code that could be
   reused for a rewrite of "add -i" (which I think is in Perl), for example.
   The minimum "You need to have these to use Git" should be made more
   portable by doing *less* in shell or Perl, not by adding more in the higher-
   level languages, and certainly not by adding other languages, be it Ruby or
   Lua.
 - Giving solid interface to the outside world, e.g. remote-helpers, credential-
   helpers API, and let the users and developers that want to use them do their
   own projects, without adding things to contrib/.

In other words, now the Git user and developer community are strong and thriving, we should strive to make the core smaller, not larger, and encourage people to form more third party communities that specialise in the areas the participant of these communities are stronger than those who are involved in the core (e.g. like myself, Peff, Nico, Jonathan, etc.). For programs that talk remote-helper or credential-helper protocols, for example, it is wasteful to have them in our contrib/ and have the changes to them go through my tree, with the same coding style standard applied to the core, which would in the longer term only add unnecessary overhead to what they want to do and what their effort supply the users with.

For that, defining a good inter-system interface boundary is essential on the core side, but we do not need to (and I do not want to see us on the core side doing) design and implement the other side that talks to us, which people may write in their favorite higher-level languages.

We define a reasonably robust object & history transfer mechanism over SSH connection with set of necessary hooks to customize what happens when a push and a fetch is requested, and Sitaram built Gitolite totally outside the core. I think that is the kind of thing we want to see *more* in this community. Was it better if we defined in the core how "hosting" service is to be done and implemented one ourselves? I do not think so. Similarly for Michael Haggerty's iMerge, which was done outside the core.

Previous: Felipe ContrerasNext: brian m. carlson
Message 21 of 26 in “Support for Ruby”
  1. 0/7 Support for RubyFelipe Contreras, Sep 21, 2013
  2. 1/7 Add support for ruby commandsFelipe Contreras, Sep 21, 2013
  3. 2/7 ruby: add setup scriptFelipe Contreras, Sep 21, 2013
  4. 3/7 ruby: add simple wrappersFelipe Contreras, Sep 21, 2013
  5. 4/7 ruby: rewrite 'request-pull'Felipe Contreras, Sep 21, 2013
  6. 5/7 ruby: rewrite perl scriptFelipe Contreras, Sep 21, 2013
  7. 6/7 ruby: remove one forkFelipe Contreras, Sep 21, 2013
  8. 7/7 ruby: rewrite 'reset'Felipe Contreras, Sep 21, 2013
  9. brian m. carlsonSep 21, 2013
  10. Felipe ContrerasSep 21, 2013
  11. brian m. carlsonSep 21, 2013
  12. Felipe ContrerasSep 22, 2013
  13. Fredrik GustafssonSep 22, 2013
  14. Felipe ContrerasSep 22, 2013
  15. Fredrik GustafssonSep 22, 2013
  16. Felipe ContrerasSep 22, 2013
  17. Patrick DonnellySep 23, 2013
  18. Felipe ContrerasSep 23, 2013
  19. Patrick DonnellySep 23, 2013
  20. Felipe ContrerasSep 23, 2013
  21. Junio C HamanoSep 23, 2013
  22. brian m. carlsonSep 23, 2013
  23. Felipe ContrerasSep 28, 2013
  24. Felipe ContrerasSep 23, 2013
  25. Felipe ContrerasSep 28, 2013
  26. Felipe ContrerasSep 28, 2013

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.