Subject: Re: RFC: a plugin architecture for git extensions?

From: Jonathan Nieder <[email-masked]>
Date: Tue, 26 Apr 2011 22:58:25 -0500

Hi Jon,

Jon Seymour wrote:

> Has anyone ever given consideration to git supporting a plugin
> architecture for git extensions?
>
> The idea would be to provide a consistent way to install, and address
> extensions to the core git functionality in a manner that does not
> require the extension to actually be integrated into the git core.

I haven't looked into 'git work' yet, but for my own private tweaks,
two mechanisms have sufficed:

 * adding a program named git-foo to the $PATH introduces a
   'git foo' command.  For the git command look and feel, scripts
   tend to start with

	. "$(git --exec-path)"/git-sh-setup

   (see git-sh-setup(1) for details).

 * various existing git commands can have their behavior modified
   through configuration and hooks.

Does 'git work' require changing the behavior of existing commands,
and if so, are there hooks that could be introduced to help in doing
that?