Subject: Re: [PATCH v2 2/2] object name: introduce '^{/!-<negativepattern>}' notation

From: Junio C Hamano <[email-masked]>
Date: Fri, 08 Jan 2016 10:21:48 -0800

Stephen Smith <[email-masked]> writes:

> Junio C Hamano <gitster <at> pobox.com> writes:
>> >  	echo modified >>a-blob &&
>> >  	git add -u &&
>> >  	git commit -m Modified &&
>> > +	git branch modref &&
>> 
>> This probably belongs to the previous step, no?
>> 
> What did you mean by this comment?  I looked at the original patch and at 
> Will's response to your comment and am not quite sure what was meant.

Notice that the title is [2/2], so there is [1/2], which turns out
to be http://article.gmane.org/gmane.comp.version-control.git/270898

That patch updates the preparatory steps of the test script so that
[2/2] have more commits and refs to work with to perform more tests.

Marking the result of that "Modified" commit so that it can be
referenced later with a short name 'modref' is something that should
have done in [1/2], which added that new invocation of "git commit"
to record that "Modified" commit, not in [2/2] as an afterthought
"Oh I created Modified commit in 1/2 so that I can use it in the
test in 2/2, but I forgot to give it a name, so I am adding a new
invocation of 'git branch' in this step".

>
>> > +test_expect_success 'ref^{/!-}' '
>> > +	test_must_fail git rev-parse master^{/!-}
>> > +'
>> 
> I plan on leaving this in.
>
>> > +test_expect_success 'ref^{/!-.}' '
>> > +	test_must_fail git rev-parse master^{/!-.}
>> > +'
>> 
> I plan on leaving this in.