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

Re: Plugin mechanism(s) for Git?

From
Jeff King <peff@peff.net>
Date
Jul 16, 2016, 08:06 UTC
Message-ID
<20160716080654.GA10538@sigill.intra.peff.net>
In-Reply-To
<CACsJy8AZak5LyLhLz-6YX0vB8uevKt--Fe9EAMAe1_=14JaaVQ@mail.gmail.com>
On Sat, Jul 16, 2016 at 07:31:25AM +0200, Duy Nguyen wrote:
Show 14 quoted lines
> >> > I wouldn’t be too quick to dismiss dynamically loaded libraries as
> >> > there are some distinct advantages over the other patterns especially
> >> > performance and simplicity.  I realize it requires us to version the
> >> > ABI but there are established patterns to manage this.  It also isn’t
> >> > that much different than us having to freeze or version the protocol
> >> > for communicating with a remote-helper.
> >
> > (re-adding dropped CCs)
> >
> > The critical difference is protocols can be tested and debugged
> > in a language/tool-independent way.
> 
> Not using dynamic libraries also makes it possible for other git
> reimplementations to reuse the same plugins.
Good point.

I think for the ref backends (which so far are the main pluggable thing that people expect to link in), the assumption was that the on-disk formats would be documented, and implementations would then write their own plugins to match the on-disk formats.

I think all of the other implementations _except_ core git already have their own internal pluggable ref formats (I know libgit2 and JGit do).

In theory if Git defines the API for the plugin to meet, then one could use those plugins with other implementations. In practice, I think ref plugins will also make use of Git functions (even things as simple as xmalloc), and the ABI there is anything but stable. So I think ref backends are "pluggable" in the sense of "configurable", but not in the sense of dynamically linking third party code that git has never seen.

Likewise, I don't think licensing issues have really been discussed. I'd think at this point that any ref backends would need to be GPL, as they are quite intimately part of git, and not true pluggable modules.

-Peff
Previous: Duy NguyenNext: Mike Hommey
Message 7 of 13 in “Plugin mechanism(s) for Git?”
  1. Christian CouderJul 15, 2016
  2. Lars SchneiderJul 15, 2016
  3. Ben PeartJul 15, 2016
  4. Konstantin KhomoutovJul 15, 2016
  5. Eric WongJul 15, 2016
  6. Duy NguyenJul 16, 2016
  7. Jeff KingJul 16, 2016
  8. Mike HommeyJul 15, 2016
  9. Junio C HamanoJul 15, 2016
  10. Jeff KingJul 15, 2016
  11. Ævar Arnfjörð BjarmasonJul 15, 2016
  12. Jeff KingJul 15, 2016
  13. Ben PeartJul 15, 2016

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.