From: Junio C Hamano Date: Tue, 30 Jun 2026 19:16:45 GMT Subject: Re: [PATCH v3 0/5] builtin/refs: add ability to write references Message-ID: In-Reply-To: <20260630-pks-refs-writing-subcommands-v3-0-deb04de1ecef@pks.im> Patrick Steinhardt writes: > @@ builtin/refs.c: static int cmd_refs_optimize(int argc, const char **argv, const > + if (repo_get_oid_with_flags(repo, argv[1], &newoid, GET_OID_SKIP_AMBIGUITY_CHECK)) > + die(_("invalid object ID: '%s'"), argv[1]); > + if (is_null_oid(&newoid)) > -+ die(_("cannot create reference with null old object ID")); > ++ die(_("cannot create reference with null new object ID")); > + > + ret = refs_update_ref(get_main_ref_store(repo), message, refname, > + &newoid, null_oid(repo->hash_algo), flags, > @@ t/t1466-refs-create.sh (new) > + ( > + cd repo && > + test_must_fail git refs create refs/heads/foo $ZERO_OID 2>err && > -+ test_grep "null old object ID" err && > ++ test_grep "null new object ID" err && > + test_must_fail git refs exists refs/heads/foo > + ) > +' Looks obviously correct. Thanks.