static struct ref_lock *lock_ref_oid_basic(struct files_ref_store *refs,
const char *refname,
const struct object_id *old_oid,
- const struct string_list *extras,
- const struct string_list *skip,
int *type, struct strbuf *err)
{
struct strbuf ref_file = STRBUF_INIT;
last_errno = errno;
if (!refs_verify_refname_available(
&refs->base,
- refname, extras, skip, err))
+ refname, NULL, NULL, err))
strbuf_addf(err, "there are still refs under '%s'",
refname);
goto error_return;
last_errno = errno;
if (last_errno != ENOTDIR ||
!refs_verify_refname_available(&refs->base, refname,
- extras, skip, err))
+ NULL, NULL, err))
strbuf_addf(err, "unable to resolve reference '%s': %s",
refname, strerror(last_errno));
*/
if (is_null_oid(&lock->old_oid) &&
refs_verify_refname_available(refs->packed_ref_store, refname,
- extras, skip, err)) {
+ NULL, NULL, err)) {
last_errno = ENOTDIR;
goto error_return;
}
logmoved = log;
-
- lock = lock_ref_oid_basic(refs, newrefname, NULL, NULL, NULL,
- NULL, &err);
+ lock = lock_ref_oid_basic(refs, newrefname, NULL, NULL, &err);
if (!lock) {
if (copy)
error("unable to copy '%s' to '%s': %s", oldrefname, newrefname, err.buf);
goto out;
rollback:
- lock = lock_ref_oid_basic(refs, oldrefname, NULL, NULL, NULL,
- NULL, &err);
+ lock = lock_ref_oid_basic(refs, oldrefname, NULL, NULL, &err);
if (!lock) {
error("unable to lock %s for rollback: %s", oldrefname, err.buf);
strbuf_release(&err);
struct ref_lock *lock;
int ret;
- lock = lock_ref_oid_basic(refs, refname, NULL,
- NULL, NULL, NULL,
- &err);
+ lock = lock_ref_oid_basic(refs, refname, NULL, NULL, &err);
if (!lock) {
error("%s", err.buf);
strbuf_release(&err);
* reference itself, plus we might need to update the
* reference if --updateref was specified:
*/
- lock = lock_ref_oid_basic(refs, refname, oid,
- NULL, NULL, &type, &err);
+ lock = lock_ref_oid_basic(refs, refname, oid, &type, &err);
if (!lock) {
error("cannot lock ref '%s': %s", refname, err.buf);
strbuf_release(&err);