Re: [PATCH v4 07/16] refs: add refs_head_ref()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Sep 6, 2017, 11:23 UTC
- Message-ID
- <CACsJy8BdyS0TpP6o+qyfQpQ1wyfSn63P8U70EkGoV4-+EFteHw@mail.gmail.com>
- In-Reply-To
- <xmqqfucgvdk8.fsf@gitster.mtv.corp.google.com>
On Fri, Aug 25, 2017 at 4:52 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: > > ... which does what? > > Unlike refs_for_each_ref() and friends, this does not iterate. > It just uses the same function signature to make a single call > of fn on the "HEAD" ref. > > Did I capture what it does right?
It's basically head_ref() but can take any ref store (while head_ref() always uses the main ref store). I'll update the commit message. What you describe is correct, but I think I'll leave that out and assume people know what head_ref() does.
-- Duy