Re: [PATCH] [RFC] Make git-update-ref invoke the update and post-update hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 15, 2015 at 2:22 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> I am ultra-doubtful at this point ;-)
>
> For one thing, update-ref is not a tool that is exclusive to
> receiving object transfer aka receive-pack, so it makes no sense for
> it to pay attention to post-update.

I was a little dubious about that as well, though I like the idea of
update-ref having a hook.

> Also it is a low-level plumbing; the policy issues should come at a
> level higher than that.  I.e. Porcelain scripts implemented using
> them as building blocks should be the ones that you do your policy,
> e.g.
>
>         if whatever logic you want to use in your policy says OK
>         then
>                 git update-ref ...args...
>         else
>                 echo >&2 "My policy does not like your arguments"
>                 exit 1
>         fi
>

In principle I agree, though telling people "you should use xyz
script" is one thing; in practice they're more likely to google "git
alter history" and eventually find an explanation for using
update-ref, completely bypassing any policy/protocol we put in place
for altering history on the master repo.

Would you be less doubtful about adding a lower-level hook for
update-ref?  Or in lieu of that, a config option that can affect the
behavior of its "-m" and "-d" options?

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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]