mirror of
https://github.com/git/git.git
synced 2026-03-26 00:20:10 +01:00
Merge branch 'hn/create-reflog-simplify' into hn/reftable-coverity-fixes
* hn/create-reflog-simplify: refs: drop force_create argument of create_reflog API
This commit is contained in:
@@ -182,11 +182,10 @@ 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;
|
||||
|
||||
ret = refs_create_reflog(refs, refname, force_create, &err);
|
||||
ret = refs_create_reflog(refs, refname, &err);
|
||||
if (err.len)
|
||||
puts(err.buf);
|
||||
return ret;
|
||||
|
||||
@@ -108,7 +108,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
|
||||
|
||||
Reference in New Issue
Block a user