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

Re: Plugin mechanism(s) for Git?

From
Lars Schneider <larsxschneider@gmail.com>
Date
Jul 15, 2016, 07:37 UTC
Message-ID
<2C31984D-310C-4E8C-927B-6D98B7D7570B@gmail.com>
In-Reply-To
<CAP8UFD1BnnRqsv8zrcDDby=KqQ3UCDVdHWTycfDNTeyfLArn5g@mail.gmail.com>
Show 27 quoted lines
> On 15 Jul 2016, at 08:46, Christian Couder <christian.couder@gmail.com> wrote:
> 
> [...]
> 
> The current topics/work I can think of are:
> 
> - the ref backend work by Michael based on Ronnie Sahlberg's and others' work,
> - the smudge/clean filters work by Joey and Lars,
> - the watchman/index helper work by David, Duy and Ben,
> - the external ODB work by Peff and myself.
> 
> They all have a need to talk to potentially different
> backends/external processes and this need is potentially not well
> satisfied by the usual mechanism that Git has traditionally used which
> is to have one or a few commands configured and to just launch the
> command(s) for each file or object, like what "git difftool" and "git
> mergetool" do.
> 
> [...]
> 
> If people think that evolution is better than intelligent design, and
> want each current topic/work to just implement what is best for it,
> then that's ok for me. If on the other hand standardizing on some ways
> to interact with external processes could be helpful to avoid
> duplicating mechanisms/code in slightly different and incompatible
> ways, then I would be happy to discuss it in a thread that is not
> specific to one of the current work.
Thanks for this great summary of the problem, Christian!
I think a generic plugin mechanism would be great but how would we do it?

We could dynamically load libraries but this would force us to freeze the ABI as mentioned by Duy: http://article.gmane.org/gmane.comp.version-control.git/298463

Unix sockets are not really portable as mentioned by Dscho: http://article.gmane.org/gmane.comp.version-control.git/298432

So far the pipe communication used by the clean/smudge filter seems to be a good option. Maybe we could "standardize" some kind of protocol over pipes?

I also like your ODB work and I think it is the right thing to do in the long run. However, I only have a couple of hours a week to work on this and improving an existing solution seemed easier to me (ODB would require bigger changes in Git and Git-LFS for instance).

Thanks, Lars

Previous: Christian CouderNext: Ben Peart
Message 2 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.