Re: [PATCH 5/6] git-reflog: add create and exists functions
From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:31
Junio C Hamano [off-list ref] writes:
Now, going back to 4/6, I think create_reflog() function as an
external API has a few problems.
* Its name does not tell us what should happen when a reflog
already exists for the refname the caller asked to "create"
reflog for. I understand that this only makes sure it exists and
does not destroy existing one. Its old name, log_ref_setup(),
did not have this problem, but now it does.
...
* Add a thin-wrapper for callers that do not care about the path to
the log file, e.g.
int vivify_reflog(const char *refname, struct strbuf *err)
{As usual, I am aware that I am not good at naming things (but I can tell when somebody uses a bad name), and "vivify" may be a horrible name for that. A reroll with a better name is very much welcomed. Perhaps prepare-reflog? I dunno.