On 08/12/2013 02:39 PM, Jeff King wrote:
> On Mon, Aug 12, 2013 at 09:52:45PM +1000, Andrew Ardill wrote:
>> On 11 August 2013 02:58, Junio C Hamano <gits...@pobox.com> wrote:
>>> Perhaps we need a lighter-weight mechanism
>>>         git init --profile=open
>>>         git clone --profile=open git://git.kernel.org/git.git
>> This is something I would definitely use.
>> All of my work git directories are in a separate folder to my other
>> git directories, and as such it would be extremely convenient if every
>> repository under that folder defaulted to the same profile. That may
>> be asking for too much though!
> We could do something like the patch below, which allows:
>   $ git config --global include./magic/.path .gitconfig-magic
> to read ~/.gitconfig-magic only when we are in a repository with a
> directory component "/magic/".
> I can see how such a thing might be useful, even though I do not have a
> use for that much flexibility myself. I find myself doing this trick for
> things like editor settings, but not for git config. So do not count
> this necessarily as a vote for doing this; it was a fun exercise for me
> that others might find useful.

We could satisfy a whole class of wishes by supporting
user-wide/system-wide git hooks like

    ~/.githooks/{pre,post}-clone     /etc/githooks/{pre,post}-clone
    ~/.githooks/{pre,post}-init      /etc/githooks/{pre,post}-init

I suppose similar functionality could be implemented via git aliases,
but hook scripts are easier to install and share.


Michael Haggerty
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to