All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: Hilco Wijbenga <hilco.wijbenga@gmail.com>
Cc: Thomas Rast <trast@student.ethz.ch>,
	Junio C Hamano <gitster@pobox.com>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Git Users <git@vger.kernel.org>
Subject: Re: Is there any way to make hooks part of the repository?
Date: Fri, 4 May 2012 08:10:57 +0200	[thread overview]
Message-ID: <CALKQrgcTtjQtS34EZhay8nMKxFO2iCHv+YCZjXefB6oZsa93kw@mail.gmail.com> (raw)
In-Reply-To: <CAE1pOi39i4hg_bTuigq15ifuKtXVW7F-NukMP57E_4e=s0fMdQ@mail.gmail.com>

On Thu, May 3, 2012 at 7:05 PM, Hilco Wijbenga <hilco.wijbenga@gmail.com> wrote:
> On 3 May 2012 02:00, Thomas Rast <trast@student.ethz.ch> wrote:
>> Shouldn't those checks be made server-side with a pre-receive hook?
>
> Firstly, see my original email: we have no such access to the server.
> Secondly, (now that I've thought about it a bit more), it makes more
> sense to do it on the "client" instead of having the server do all the
> work for everybody. (Fail early, fail fast.)

No matter how you go about this, there is no way to _guarantee_ that a
given hook is run in all user repos (after all, the users have the
ultimate control over their own repos), so if you really _need_ the
hook to be run, then you have no other choice but to put it on the
server. Such is the nature of distributed version control.

If you still want a hook to run in user repos, you can only ask that
users enable the hook by including a script which copies the hook into
place, and then tell your users to run that script (e.g. in your
README).


...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

      reply	other threads:[~2012-05-04  6:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01 20:24 Is there any way to make hooks part of the repository? Hilco Wijbenga
2012-05-01 20:33 ` Junio C Hamano
2012-05-01 20:57   ` Randal L. Schwartz
2012-05-01 21:03     ` Junio C Hamano
2012-05-01 21:09       ` Hilco Wijbenga
2012-05-01 21:59         ` PJ Weisberg
2012-05-01 22:21           ` Hilco Wijbenga
2012-05-02  0:10             ` Nathan Gray
2012-05-02  0:18               ` Hilco Wijbenga
2012-05-01 21:07     ` Hilco Wijbenga
2012-05-01 21:00   ` Hilco Wijbenga
2012-05-02  6:38     ` Matthieu Moy
2012-05-02 19:10       ` Hilco Wijbenga
2012-05-02 19:27         ` Junio C Hamano
2012-05-02 19:42           ` Hilco Wijbenga
2012-05-03  9:00             ` Thomas Rast
2012-05-03 17:05               ` Hilco Wijbenga
2012-05-04  6:10                 ` Johan Herland [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=CALKQrgcTtjQtS34EZhay8nMKxFO2iCHv+YCZjXefB6oZsa93kw@mail.gmail.com \
    --to=johan@herland.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hilco.wijbenga@gmail.com \
    --cc=trast@student.ethz.ch \
    /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.