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

RFC: a minimal plugin architecture

From
Jon Seymour <jon.seymour@gmail.com>
Date
Apr 28, 2011, 23:22 UTC
Message-ID
<BANLkTi=53dShgcsyTUP2aA+hvm6p+93XrA@mail.gmail.com>
Hi,

I am starting to get the idea that everyone feels I am being a little too ambitious. Slow learner, I know.

I think this is because my visions are much grander than people are willing to swallow right now, so I want to scale back to where I think there is some consensus and get some feedback about what a minimal plugin architecture would be.

I understand that I am yet to convince people of the merits of either git -mediated plugin management or package management, so let's assume that the contents of a "git-plugins" directory is managed only by package managers or plugin authors, following guidelines established by git-core.

I observed that Pau, Junio and Jonathan are receptive to the idea of a "standard" directory into which plugins could be installed. Pau would prefer one directory per package, and with that I would concur.

However, let's start simple, what would a minimal plugin directory look like and, assuming there was one per git-install, where would it be located relative to the prefix?

Here's a suggestion for the layout:
bin/
   - all scripts and sh libraries
man/
   - all man pages
html/
   - all html pages
What about location?
   ${prefix}/git-plugins
   ${prefix}/lib/git-plugins
Or, decided by distribution?
Is there support for the idea of adding a --man-path switch to the main line?

What about a --plugins-path, that would answer the question about where plugins should go?

Per Jonathan's and Junio's suggestions, the idea of having a plugins search path seems like a reasonable one, so that users without control over the git install can at least customize it themselves.

How would this path be configured by the user? Would the user configuration edit the git default or would it override it?

If there are multiple plugin directories, how would a plugin discover which one it has been installed in so that it can find any plugin-specific resource it might need?

Regards,
jon.
Next: david@lang.hm
Message 1 of 3 in “RFC: a minimal plugin architecture”
  1. Jon SeymourApr 28, 2011
  2. david@lang.hmApr 29, 2011
  3. Jon SeymourApr 29, 2011

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.