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

2014-12-02 Thread Junio C Hamano
Johannes Schindelin writes: > ... (i.e. by only lightly testing obscure code paths that will be > executed rarely, risking bugs in favor of adding tests when fixing said > bugs when – and if – they arise). I'd like to learn a bit more about this part, not because I want to say you are wrong, but

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

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Tue, 2 Dec 2014, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> 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 implementati

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

2014-12-02 Thread Junio C Hamano
Johannes Schindelin writes: >> 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

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

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Tue, 2 Dec 2014, Junio C Hamano wrote: > Johannes Schindelin 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

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

2014-12-02 Thread Junio C Hamano
Johannes Schindelin 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. somethin

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

2014-12-02 Thread Johannes Schindelin
Hi Michael, On Tue, 2 Dec 2014, Michael J Gruber wrote: > Johannes Schindelin schrieb am 02.12.2014 um 09:47: > > > The only sad part is that the already huge test suite is enlarged by > > yet another extensive set of test cases (and those tests might not > > really need to be that extensive bec

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

2014-12-02 Thread Michael J Gruber
Johannes Schindelin schrieb am 02.12.2014 um 09:47: > Hi Junio, > > On Mon, 1 Dec 2014, Junio C Hamano wrote: > >> When receive.denyCurrentBranch is set to updateInstead, this hook >> can be used to override the built-in "push-to-deploy" logic, which >> insists that the working tree and the index

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

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 Dec 2014, Junio C Hamano wrote: > When receive.denyCurrentBranch is set to updateInstead, this hook > can be used to override the built-in "push-to-deploy" logic, which > insists that the working tree and the index must be unchanged > relative to HEAD. The hook receives the c

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

2014-12-01 Thread Junio C Hamano
When receive.denyCurrentBranch is set to updateInstead, this hook can be used to override the built-in "push-to-deploy" logic, which insists that the working tree and the index must be unchanged relative to HEAD. The hook receives the commit with which the tip of the current is going to be updated