@@ -182,9 +182,9 @@ static int cmd_reflog_exists(struct ref_store *refs, const char **argv)
static int cmd_create_reflog(struct ref_store *refs, const char **argv)
{
const char *refname = notnull(*argv++, "refname");
- int force_create = arg_flags(*argv++, "force-create");
struct strbuf err = STRBUF_INIT;
int ret;
+ int force_create = 1;
ret = refs_create_reflog(refs, refname, force_create, &err);
if (err.len)
@@ -35,8 +35,7 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '
git rev-parse FOO -- &&
git rev-parse refs/tags/new-tag -- &&
m=$(git rev-parse main) &&
- REF_NO_DEREF=1 &&
- $RUN delete-refs $REF_NO_DEREF nothing FOO refs/tags/new-tag &&
+ $RUN delete-refs REF_NO_DEREF nothing FOO refs/tags/new-tag &&
test_must_fail git rev-parse --symbolic-full-name FOO &&
test_must_fail git rev-parse FOO -- &&
test_must_fail git rev-parse refs/tags/new-tag --
@@ -108,7 +107,7 @@ test_expect_success 'delete_reflog(HEAD)' '
'
test_expect_success 'create-reflog(HEAD)' '
- $RUN create-reflog HEAD 1 &&
+ $RUN create-reflog HEAD &&
git reflog exists HEAD
'
@@ -92,7 +92,7 @@ test_expect_success 'delete_reflog() not allowed' '
'
test_expect_success 'create-reflog() not allowed' '
- test_must_fail $RUN create-reflog HEAD 1
+ test_must_fail $RUN create-reflog HEAD
'
test_done