Re: [PATCH] notes: Use get_sha1_committish instead of read_ref in init_notes()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 17, 2015, 15:18 UTC
- Message-ID
- <xmqqsi9q4b46.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150617094036.GA536@glandium.org>
Mike Hommey <mh@glandium.org> writes:
> I'm tempted to make init_notes itself do the check, based on the value > it is given for a "read_only" argument.
Yeah, that would be one sensible way to go after making sure that everything goes thru this interface.
> On the other hand, some commands > do their ref resolving themselves already.
Again, as long as they do not bypass the "read-only" safety you are suggesting to add to init_notes(), that is OK.