Merge branch 'hn/create-reflog-simplify'

A small simplification of API.

* hn/create-reflog-simplify:
  refs: drop force_create argument of create_reflog API
This commit is contained in:
Junio C Hamano
2021-12-10 14:35:13 -08:00
10 changed files with 18 additions and 23 deletions

View File

@ -1671,15 +1671,14 @@ error:
return -1;
}
static int files_create_reflog(struct ref_store *ref_store,
const char *refname, int force_create,
static int files_create_reflog(struct ref_store *ref_store, const char *refname,
struct strbuf *err)
{
struct files_ref_store *refs =
files_downcast(ref_store, REF_STORE_WRITE, "create_reflog");
int fd;
if (log_ref_setup(refs, refname, force_create, &fd, err))
if (log_ref_setup(refs, refname, 1, &fd, err))
return -1;
if (fd >= 0)