Re: [PATCH 6/9] pseudorefs: create and use pseudoref update and delete functions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 24, 2015, 19:25 UTC
- Message-ID
- <xmqqbnf1mk72.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1437713129-19373-7-git-send-email-dturner@twopensource.com>
David Turner <dturner@twopensource.com> writes:
> Pseudorefs should not be updated through the ref API, because the ref > API is for real refs. Instead, use a dedicated pseudoref API. > > This patch changes writes to CHERRY_PICK_HEAD, REVERT_HEAD, and ORIG_HEAD.
This feels somewhat backwards, and it makes me wonder if it is a better approach to teach update_ref() about the naming rules, so that the callers do not have to say the same thing twice "This is not a ref and I am giving all-caps name, by the way I am also not calling update_ref() because that is only for real refs".