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

Re: RFC: a plugin architecture for git extensions?

From
Jon Seymour <jon.seymour@gmail.com>
Date
Apr 28, 2011, 00:54 UTC
Message-ID
<BANLkTikCKDS3NhbpnRqf82c_oB4+JqGX-Q@mail.gmail.com>
In-Reply-To
<BANLkTi=w0aKH6dxu84i4DjkL-vNCWQi8pw@mail.gmail.com>
On Thu, Apr 28, 2011 at 10:50 AM, Jon Seymour <jon.seymour@gmail.com> wrote:
Show 86 quoted lines
> On Thu, Apr 28, 2011 at 10:10 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>>
>>> Right, my worry was based on the usual way programs find their way
>>> onto my $PATH.  That is:
>>>
>>>  - if they are installed via a package from the distro, they are in
>>>    /usr/bin.
>>>
>>>  - if they are installed with "make install" by the local sysadmin for
>>>    all users, they are in /usr/local/bin.
>>>
>>>  - if I am trying them out for myself, they are in $HOME/opt/foo/bin
>>>    and when it is time to remove it, "rm -fr $HOME/opt/foo".
>>>
>>>  - if I have adopted them, symlinks go in $HOME/bin.
>>>
>>> With a local gcc-4.6 in $HOME/bin, if the sysadmin upgrades gcc so
>>> gcc-4.6 is to appear in /usr/bin or /usr/local/bin, my setup still
>>> works without trouble.  So, barring bugs, each installation method
>>> does not interfere with the other ones.
>>>
>>> Call it overengineering, but I would want a way for installing new git
>>> commands to have the same attributes (installable by normal users in
>>> multiuser systems and name conflicts not being a terrible
>>> administrative burden).
>>
>> Ok, I wasn't thinking about folks who use repackaged /usr/bin/git together
>> with their own choice of third-party enhancements.
>>
>> Probably we would be better off if we define a new set of paths that is
>> independent from GIT_EXEC_PATH and friends.  The installed git and nothing
>> else will occupy GIT_EXEC_PATH etc., but at the runtime, git would look at
>> a user-writable location GIT_PLUGIN_PATH/{bin,man,...} to see if the user
>> has her own customization, and add them to its vocabulary.
>>
>> Or something like that.  I am not all that interested, but it feels like a
>> good direction.
>>
>
> I agree. Apologies for confusing things by talking too much about a
> git pm install command.
>
> I think there are 3 levels of functionality. FWIW, I am suggesting
> git-core stops at #2.
>
> 0. unmanaged plugins
>
> git doesn't provide any explicit management of plugins, but will use
> them if finds them.
>
> Without some kind of management, however, you will be forced to dump
> the man pages and scripts
> for the plugins in one place.
>
> This would be very distribution manager unfriendly since there could
> be conflicts galore.
>
> I guess an unmanaged solution could use separate directories for each
> plugin, but this would imply scanning all these paths each time you
> invoke git. In my view, symbolic links from a dir already
> GIT_EXEC_PATH to plugin directories would be a more efficient way to
> do this.
>
> 1. managed plugins
>
> git provides minimal plugin management functionality. Each plugin has
> its own directory, but an activate step is required to make the plugin
> available to the GIT_EXEC_PATH and GIT_MAN_PATH.
>
> This has the advantage that conflicts between plugins would be more
> readily avoided and is potentially more performant. As Pau suggests,
> this option is much more package manager friendly
>
> It probably does require a git plugin command of some kind, however,
> in order to perform the activation step.
>
> 2. managed packages
>
> A meta-package manager for plugins, that delegates plugin installation
> concerns to a platform package manager.
>
> The thing is, you may absolutely hate #2, but if approach #1 is
> adopted by git-core, someone can at least attempt this by, well,
> writing a plugin for it.
>
Sorry, sorry/. git-core stops at #1!!
> jon.
>
Previous: Jon SeymourNext: david@lang.hm
Message 56 of 105 in “RFC: a plugin architecture for git extensions?”
  1. Jon SeymourApr 27, 2011
  2. Jonathan NiederApr 27, 2011
  3. Jon SeymourApr 27, 2011
  4. Junio C HamanoApr 27, 2011
  5. Jon SeymourApr 27, 2011
  6. Junio C HamanoApr 27, 2011
  7. Jon SeymourApr 27, 2011
  8. Jon SeymourApr 27, 2011
  9. Junio C HamanoApr 27, 2011
  10. Jon SeymourApr 27, 2011
  11. Jon SeymourApr 27, 2011
  12. Michael J GruberApr 27, 2011
  13. Jon SeymourApr 27, 2011
  14. Jon SeymourApr 27, 2011
  15. Motiejus JakštysApr 27, 2011
  16. Jon SeymourApr 27, 2011
  17. Motiejus JakštysApr 27, 2011
  18. Carlos Martín NietoApr 27, 2011
  19. Jon SeymourApr 27, 2011
  20. Fredrik GustafssonApr 27, 2011
  21. Jon SeymourApr 27, 2011
  22. Pau Garcia i QuilesApr 27, 2011
  23. Jon SeymourApr 27, 2011
  24. Ævar Arnfjörð BjarmasonApr 27, 2011
  25. Jon SeymourApr 27, 2011
  26. Enrico WeigeltMay 13, 2011
  27. Andreas EricssonApr 27, 2011
  28. Jon SeymourApr 27, 2011
  29. Felipe ContrerasApr 27, 2011
  30. Jon SeymourApr 27, 2011
  31. Andreas EricssonApr 27, 2011
  32. Jon SeymourApr 27, 2011
  33. Jon SeymourApr 27, 2011
  34. A Large Angry SCMApr 27, 2011
  35. Jon SeymourApr 28, 2011
  36. Jon SeymourApr 28, 2011
  37. Jon SeymourApr 28, 2011
  38. Jon SeymourApr 28, 2011
  39. david@lang.hmApr 28, 2011
  40. Jon SeymourApr 29, 2011
  41. Motiejus JakštysApr 27, 2011
  42. Motiejus JakštysApr 27, 2011
  43. Junio C HamanoApr 27, 2011
  44. Junio C HamanoApr 27, 2011
  45. Drew NorthupApr 27, 2011
  46. Joey HessApr 27, 2011
  47. Drew NorthupApr 27, 2011
  48. Junio C HamanoApr 27, 2011
  49. Jonathan NiederApr 27, 2011
  50. Jon SeymourApr 27, 2011
  51. Andreas EricssonApr 28, 2011
  52. Junio C HamanoApr 27, 2011
  53. Jonathan NiederApr 27, 2011
  54. Junio C HamanoApr 28, 2011
  55. Jon SeymourApr 28, 2011
  56. Jon SeymourApr 28, 2011
  57. david@lang.hmApr 28, 2011
  58. Jon SeymourApr 28, 2011
  59. Jon SeymourApr 28, 2011
  60. Jon SeymourApr 28, 2011
  61. Andreas EricssonApr 28, 2011
  62. Jon SeymourApr 28, 2011
  63. Jonathan NiederApr 28, 2011
  64. Jon SeymourApr 28, 2011
  65. David AguilarMay 5, 2011
  66. Junio C HamanoMay 5, 2011
  67. Jon SeymourMay 5, 2011
  68. Junio C HamanoMay 6, 2011
  69. Jon SeymourMay 6, 2011
  70. Jonathan NiederMay 6, 2011
  71. Jonathan NiederMay 6, 2011
  72. Jon SeymourMay 6, 2011
  73. Jonathan NiederMay 6, 2011
  74. Jon SeymourMay 6, 2011
  75. Jonathan NiederMay 6, 2011
  76. Jon SeymourMay 8, 2011
  77. Jonathan NiederMay 8, 2011
  78. Jon SeymourMay 8, 2011
  79. Jeff KingMay 6, 2011
  80. John SzakmeisterMay 7, 2011
  81. Jon SeymourMay 8, 2011
  82. Jeff KingMay 9, 2011
  83. Jon SeymourMay 9, 2011
  84. Jeff KingMay 9, 2011
  85. Jon SeymourMay 9, 2011
  86. Jeff KingMay 9, 2011
  87. Jon SeymourMay 9, 2011
  88. Jon SeymourMay 9, 2011
  89. Jeff KingMay 9, 2011
  90. Jon SeymourMay 9, 2011
  91. Jeff KingMay 9, 2011
  92. Jon SeymourMay 9, 2011
  93. Jon SeymourMay 8, 2011
  94. Miles BaderMay 9, 2011
  95. David AguilarMay 14, 2011
  96. Andreas EricssonApr 28, 2011
  97. Jon SeymourApr 28, 2011
  98. Pau Garcia i QuilesApr 28, 2011
  99. Jon SeymourApr 28, 2011
  100. Pau Garcia i QuilesApr 28, 2011
  101. Jon SeymourApr 28, 2011
  102. Jon SeymourApr 28, 2011
  103. Jon SeymourApr 28, 2011
  104. Motiejus JakštysApr 27, 2011
  105. Jon SeymourApr 27, 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.