Re: [PATCH 3/4] refs.c: move ref parsing code out of resolve_ref()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jul 26, 2014, 01:50 UTC
- Message-ID
- <CACsJy8DWEuiyyj0HhnGttnbyQ2+tTWDAW5H67uBXeV4ESM6seg@mail.gmail.com>
- In-Reply-To
- <CAL=YDWnWAoCrJn28vGKb=xrKKO=fCN=Uz+nM+eh+dYbHCFYpgQ@mail.gmail.com>
On Fri, Jul 25, 2014 at 11:12 PM, Ronnie Sahlberg <sahlberg@google.com> wrote:
Show 14 quoted lines
>> diff --git a/refs.c b/refs.c >> index bec2bb1..2769f20 100644 >> --- a/refs.c >> +++ b/refs.c >> @@ -1533,6 +1533,105 @@ static int handle_missing_loose_ref(const char *refname, >> } >> } >> >> +int parse_ref(const char *path, struct strbuf *ref, >> + unsigned char *sha1, int *flag) > > Can you make this function static? > It is not used by anything outside of this series and thus making it > static avoids growing the public refs api.
It's to be used by builtin/checkout.c in nd/multiple-work-trees. I could mark it static now and unmark it later, but I'd need to add the static prototype back in refs.c because in the next patch resolve_gitlink_ref() uses this function and resolve_gitlink_ref() is before parse_ref().
-- Duy