Re: [PATCH v7 4/4] notes: teach git-notes about notes.<ref>.mergestrategy option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 17, 2015, 17:33 UTC
- Message-ID
- <xmqqlhd9es5s.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CA+P7+xofitJ2tTxqtRyWitcSKt4sKZCH5tygJxXScuW8wkW=SA@mail.gmail.com>
Jacob Keller <jacob.keller@gmail.com> writes:
> How do you feel about having the duplicate check for the short_ref? We > *already* check this inside init_notes_check() which is called right > after this.
I thought you were trying to enforce a new rule (i.e. must be under "refs/notes/") with this, but it isn't. It is "we are going to strip the prefix known to us, just make sure the caller did not feed us something bogus" safety, and the placement of this new check in your patch (i.e. only when strategy was not given so we need to check which short-ref we are dealing with) is the best place.
Thanks.