Re: [PATCH v2 2/2] object name: introduce '^{/!-<negativepattern>}' notation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 8, 2016, 18:21 UTC
- Message-ID
- <xmqq37u82apv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <loom.20160108T065547-969@post.gmane.org>
Stephen Smith <ischis2@cox.net> writes:
Show 10 quoted lines
> 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".
Show 12 quoted lines
>
>> > +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.