Re: Gated Merge?

2016-02-12 Thread Jeff King
On Fri, Feb 12, 2016 at 11:06:04AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > But I don't think this needs to have anything to do with merges in > > particular, or rules like "when merging a branch that does not have me > > in it". It is about saying "from here on out, the tree state

Re: Gated Merge?

2016-02-12 Thread Junio C Hamano
Jeff King writes: > But I don't think this needs to have anything to do with merges in > particular, or rules like "when merging a branch that does not have me > in it". It is about saying "from here on out, the tree state should > match this property, and we can test it by running this script".

Re: Gated Merge?

2016-02-12 Thread Jeff King
On Fri, Feb 12, 2016 at 09:44:13AM -0800, Junio C Hamano wrote: > Andrew Ardill writes: > > > What is the benefit in doing this in notes vs having the tests in the > > working tree? > > Interesting. I have never thought of adding this information to the > project history proper---I've viewed t

Re: Gated Merge?

2016-02-12 Thread Junio C Hamano
Andrew Ardill writes: > What is the benefit in doing this in notes vs having the tests in the > working tree? Interesting. I have never thought of adding this information to the project history proper---I've viewed this as primarily an aid for keeping track of topics in-flight by an individual,

Re: Gated Merge?

2016-02-11 Thread Stefan Beller
On Thu, Feb 11, 2016 at 2:42 PM, Andrew Ardill wrote: > On 12 February 2016 at 09:06, Junio C Hamano wrote: >> >> To realize this, there are low-hanging-fruit building blocks that >> are trivial: >> >> - Such an annotation can be made as a note attached to the commit >>in question; >> >> -

Re: Gated Merge?

2016-02-11 Thread Andrew Ardill
On 12 February 2016 at 09:06, Junio C Hamano wrote: > > To realize this, there are low-hanging-fruit building blocks that > are trivial: > > - Such an annotation can be made as a note attached to the commit >in question; > > - Such a check can be done in pre-commit hook; > > - Such a pre-co

Gated Merge?

2016-02-11 Thread Junio C Hamano
I wish there were a way to let me annotate a commit with a statement like this: * When merging a branch that does not have me in it into a trunk that already has me, do this extra check on the result of the merge before allowing it to be recorded. For example, suppose there is a topic that