Re: [PATCH] add a 'pre-push' hook

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

 



Jeff King <peff@xxxxxxxx> wrote:
> I think the common wisdom has been that such tests should be done on the
> _receiving_ end, since that makes a more trustworthy enforcement point.
> E.g., I know that crap can't get into my central repo because a hook
> checks everything coming in. But if a developer has turned off his
> pre-push hook (or accidentally failed to enable it), he can still send
> crap.
> 
> One other argument I have seen is that, to prevent the proliferation of
> hooks, the rule is not to add a hook that could just as easily be done
> as a sequence of commands. IOW, what's wrong with
> 
>   run_my_automated_tests && git push

Yup, I agree completely.

Why not just setup an alias:

	git config alias.send '! run_my_tests && git push "$@"'

and retrain your fingers to use "git send ..."?
 
-- 
Shawn.
--
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]

  Powered by Linux