Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

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

 



Hi Junio,

On Tue, 2 Dec 2014, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> > In this particular case, I think that we really, really *just* need to
> > verify that the presence of the hook switches off the default behavior of
> > updateInstead. *Nothing* else is needed to verify that this particular
> > functionality hasn't regressed. I.e. something like:
> >
> > +test_expect_success 'updateInstead with push-to-checkout hook' '
> > +	rm -fr testrepo &&
> > +	git clone . testrepo &&
> > +	(
> > +		cd testrepo &&
> > +		echo unclean > path1 &&
> > +		git config receive.denyCurrentBranch updateInstead &&
> > +		echo 'touch yep' | write_script .git/hooks/push-to-checkout
> > +	) &&
> > +	git push testrepo HEAD^:refs/heads/master &&
> > +	test unclean = $(cat testrepo/path1) &&
> > +	test -f testrepo/yep
> > +'
> >
> > would be more appropriate (although it probably has one or three bugs,
> > given that I wrote this in the mailer).
> 
> Not really.  You need to remember that we write tests not to show
> off the new shiny, but to protect essential invariants from being
> broken by careless others attempting to rewrite the implementation
> in the future.

Fair enough. You are the boss.

I am not, therefore it does not matter what I think,
Johannes
--
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]