All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Benjamin Collins" <aggieben@gmail.com>
Cc: "Petr Baudis" <pasky@suse.cz>, git@vger.kernel.org
Subject: Re: cloning/pulling hooks
Date: Wed, 29 Aug 2007 12:45:18 -0700	[thread overview]
Message-ID: <7vlkbup1kh.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <b3889dff0708290618s79cffdb5nb6cc69d14efa8b9@mail.gmail.com> (Benjamin Collins's message of "Wed, 29 Aug 2007 08:18:47 -0500")

"Benjamin Collins" <aggieben@gmail.com> writes:

> On 8/29/07, Petr Baudis <pasky@suse.cz> wrote:
>> But overally, I'm still not convinced that there is a feasible use-case
>> for the cloned hooks at all. Someone has a particular example?
>>
>> --
>>                                 Petr "Pasky" Baudis
>
> My group at work would like this capability.  We have a homogeneous
> environment with well-known NFS shares, and some scripts that do
> things in this common environment (e.g., release scripts).  It would
> be nice if when we do a clone, all the hook scripts (that would be
> valid on any machine, in any directory, for any user) would come with
> it.
>
> Of course, I understand why it's not already like that, particularly
> given the context of Linux development practices.  Still - there are
> those of us that think this would be a great convenience.  Having an
> option to git-clone to retrieve the parent's hook scripts would be
> preferable, and have git-clone just disable them by default.
> 'git-clone -t repo' or some such.

I do think this is project specific, as such:

 - you can have .git/hooks be a symlink to ../git-hooks/
   (i.e. the project toplevel "git-hooks" directory, or
   whereever the project finds convenient);

 - have "git-hooks" tracked

The latter will take care of the distribution issue.  Now, we
would need a generic and convenient way to make sure that the
new repository "clone" makes has .git/hooks as a symlink to
whereever in-tree that follows the project convention.  I think
you could use the existing templates mechanism.  Allow "git
clone" to take 'template=' parameter and pass it down to "git
init" it invokes.  You use project specific template that
arranges the .git/hooks/ symlink when you clone.  We could even
support "[clone] template = this/template/file" variable in your
$HOME/.gitconfig if we go this route.

   

      parent reply	other threads:[~2007-08-29 19:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1188319608.6106.63.camel@beauty>
     [not found] ` <20070828172709.GB1219@pasky.or.cz>
2007-08-29  9:05   ` cloning/pulling hooks Andy Parkins
2007-08-29  9:52     ` Petr Baudis
2007-08-29 12:56       ` Andy Parkins
2007-08-29 13:21         ` Johannes Schindelin
2007-08-29 14:28           ` Andy Parkins
2007-08-29 20:27         ` Alex Riesen
2007-08-29 13:18       ` Benjamin Collins
2007-08-29 13:39         ` Petr Baudis
2007-08-29 13:49         ` Johannes Schindelin
2007-08-29 13:54           ` Petr Baudis
2007-08-29 14:06             ` Johannes Schindelin
2007-08-29 14:19               ` Petr Baudis
2007-08-29 14:31                 ` Johannes Schindelin
2007-08-29 14:41                   ` Petr Baudis
2007-08-29 14:56                     ` Johannes Schindelin
2007-08-29 20:35                       ` Alex Riesen
2007-08-29 19:45         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vlkbup1kh.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=aggieben@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.