{"thread":{"id":"27214","subject":"RFC: a minimal plugin architecture","startedAt":"2011-04-28T23:22:49Z","lastAt":"2011-04-29T01:29:35Z","messageCount":3,"participants":["Jon Seymour","david@lang.hm"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"166701","messageId":"BANLkTi=53dShgcsyTUP2aA+hvm6p+93XrA@mail.gmail.com","threadId":"27214","inReplyTo":null,"subject":"RFC: a minimal plugin architecture","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2011-04-28T23:22:49Z","receivedAt":"2011-04-28T23:22:49Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"Hi,\n\nI am starting to get the idea that everyone feels I am being a little\ntoo ambitious. Slow learner, I know.\n\nI think this is because my visions are much grander than people are\nwilling to swallow right now, so I want to scale back to where I think\nthere is some consensus and get some feedback about what a minimal\nplugin architecture would be.\n\nI understand that I am yet to convince people of the merits of either\ngit -mediated plugin management or package management, so let's assume\nthat the contents of a \"git-plugins\" directory is managed only by\npackage managers or plugin authors, following guidelines established\nby git-core.\n\nI observed that Pau, Junio and Jonathan are receptive to the idea of a\n\"standard\" directory into which plugins could be installed. Pau would\nprefer one directory per package, and with that I would concur.\n\nHowever, let's start simple, what would a minimal plugin directory\nlook like and, assuming there was one per git-install, where would it\nbe located relative to the prefix?\n\nHere's a suggestion for the layout:\n\nbin/\n   - all scripts and sh libraries\nman/\n   - all man pages\nhtml/\n   - all html pages\n\nWhat about location?\n\n   ${prefix}/git-plugins\n   ${prefix}/lib/git-plugins\n\nOr, decided by distribution?\n\nIs there support for the idea of adding a --man-path switch to the main line?\n\nWhat about a --plugins-path, that would answer the question about\nwhere plugins should go?\n\nPer Jonathan's and Junio's suggestions, the idea of having a plugins\nsearch path seems like a reasonable one, so that users without control\nover the git install can at least customize it themselves.\n\nHow would this path be configured by the user? Would the user\nconfiguration edit the git default or would it override it?\n\nIf there are multiple plugin directories, how would a plugin discover\nwhich one it has been installed in so that it can find any\nplugin-specific resource it might need?\n\nRegards,\n\njon.\n"},{"id":"166702","messageId":"alpine.DEB.2.00.1104281808490.7120@asgard.lang.hm","threadId":"27214","inReplyTo":"BANLkTi=53dShgcsyTUP2aA+hvm6p+93XrA@mail.gmail.com","subject":"Re: RFC: a minimal plugin architecture","fromName":"","fromEmail":"david@lang.hm","sentAt":"2011-04-29T01:12:05Z","receivedAt":"2011-04-29T01:12:05Z","isPatch":false,"sender":{"key":"david@lang.hm","avatar":null},"body":"On Fri, 29 Apr 2011, Jon Seymour wrote:\n\n> However, let's start simple, what would a minimal plugin directory\n> look like and, assuming there was one per git-install, where would it\n> be located relative to the prefix?\n>\n> Here's a suggestion for the layout:\n>\n> bin/\n>   - all scripts and sh libraries\n> man/\n>   - all man pages\n> html/\n>   - all html pages\n>\n> What about location?\n>\n>   ${prefix}/git-plugins\n>   ${prefix}/lib/git-plugins\n>\n> Or, decided by distribution?\n\ndistros are going to change this anyway, so start by accepting that, then \nmake the default just that, a default, not something hard-coded.\n\n> Is there support for the idea of adding a --man-path switch to the main line?\n>\n> What about a --plugins-path, that would answer the question about\n> where plugins should go?\n\nI think it would be better to put it in the config file, nobody is going \nto add command line options to every command they run.\n\n> Per Jonathan's and Junio's suggestions, the idea of having a plugins\n> search path seems like a reasonable one, so that users without control\n> over the git install can at least customize it themselves.\n\nonly if you make sure that the plugins only run as the user, with no \nchance of them being invoked as a privilaged user.\n\nDavid Lang\n\n> How would this path be configured by the user? Would the user\n> configuration edit the git default or would it override it?\n>\n> If there are multiple plugin directories, how would a plugin discover\n> which one it has been installed in so that it can find any\n> plugin-specific resource it might need?\n>\n> Regards,\n>\n> jon.\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"166703","messageId":"BANLkTi=zzMUoU+e=U6RzE7HPz-V=QkW+Hw@mail.gmail.com","threadId":"27214","inReplyTo":"alpine.DEB.2.00.1104281808490.7120@asgard.lang.hm","subject":"Re: RFC: a minimal plugin architecture","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2011-04-29T01:29:35Z","receivedAt":"2011-04-29T01:29:35Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"On Fri, Apr 29, 2011 at 11:12 AM,  <david@lang.hm> wrote:\n> On Fri, 29 Apr 2011, Jon Seymour wrote:\n>\n>> However, let's start simple, what would a minimal plugin directory\n>> look like and, assuming there was one per git-install, where would it\n>> be located relative to the prefix?\n>>\n>> Here's a suggestion for the layout:\n>>\n>> bin/\n>>  - all scripts and sh libraries\n>> man/\n>>  - all man pages\n>> html/\n>>  - all html pages\n>>\n>> What about location?\n>>\n>>  ${prefix}/git-plugins\n>>  ${prefix}/lib/git-plugins\n>>\n>> Or, decided by distribution?\n>\n> distros are going to change this anyway, so start by accepting that, then\n> make the default just that, a default, not something hard-coded.\n>\n\nYep. Hopefully whatever the distro decided path would be available via\na git --plugins-path switch?\n\nMight not be necessary if we let plugins install into --exec-path,\n--html-path and (proposed) --man-path.\n\n>> Is there support for the idea of adding a --man-path switch to the main\n>> line?\n>>\n>> What about a --plugins-path, that would answer the question about\n>> where plugins should go?\n>\n> I think it would be better to put it in the config file, nobody is going to\n> add command line options to every command they run.\n\nThe intent here is to help package managers and plugin authors to\ndecide where they place plugin artifacts like scripts and others\nresources. Similar to the existing --html-path and --exec-path\noptions.\n\n>\n>> Per Jonathan's and Junio's suggestions, the idea of having a plugins\n>> search path seems like a reasonable one, so that users without control\n>> over the git install can at least customize it themselves.\n>\n> only if you make sure that the plugins only run as the user, with no chance\n> of them being invoked as a privilaged user.\n>\n\nSure.\n\nThank you!\n\njon.\n"}]}