Skip to content

Commit 505312a

Browse files
committed
Merge branch 'ps/ref-api-cleanup'
Code clean-up. * ps/ref-api-cleanup: refs: drop `ref_store`-less functions
2 parents 7603482 + 91d351e commit 505312a

File tree

1 file changed

+0
-207
lines changed

1 file changed

+0
-207
lines changed

refs.h

Lines changed: 0 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,211 +1086,4 @@ int repo_migrate_ref_storage_format(struct repository *repo,
10861086
unsigned int flags,
10871087
struct strbuf *err);
10881088

1089-
/*
1090-
* The following functions have been removed in Git v2.46 in favor of functions
1091-
* that receive a `ref_store` as parameter. The intent of this section is
1092-
* merely to help patch authors of in-flight series to have a reference what
1093-
* they should be migrating to. The section will be removed in Git v2.47.
1094-
*/
1095-
#if 0
1096-
static char *resolve_refdup(const char *refname, int resolve_flags,
1097-
struct object_id *oid, int *flags)
1098-
{
1099-
return refs_resolve_refdup(get_main_ref_store(the_repository),
1100-
refname, resolve_flags,
1101-
oid, flags);
1102-
}
1103-
1104-
static int read_ref_full(const char *refname, int resolve_flags,
1105-
struct object_id *oid, int *flags)
1106-
{
1107-
return refs_read_ref_full(get_main_ref_store(the_repository), refname,
1108-
resolve_flags, oid, flags);
1109-
}
1110-
1111-
static int read_ref(const char *refname, struct object_id *oid)
1112-
{
1113-
return refs_read_ref(get_main_ref_store(the_repository), refname, oid);
1114-
}
1115-
1116-
static int ref_exists(const char *refname)
1117-
{
1118-
return refs_ref_exists(get_main_ref_store(the_repository), refname);
1119-
}
1120-
1121-
static int for_each_tag_ref(each_ref_fn fn, void *cb_data)
1122-
{
1123-
return refs_for_each_tag_ref(get_main_ref_store(the_repository), fn, cb_data);
1124-
}
1125-
1126-
static int for_each_branch_ref(each_ref_fn fn, void *cb_data)
1127-
{
1128-
return refs_for_each_branch_ref(get_main_ref_store(the_repository), fn, cb_data);
1129-
}
1130-
1131-
static int for_each_remote_ref(each_ref_fn fn, void *cb_data)
1132-
{
1133-
return refs_for_each_remote_ref(get_main_ref_store(the_repository), fn, cb_data);
1134-
}
1135-
1136-
static int head_ref_namespaced(each_ref_fn fn, void *cb_data)
1137-
{
1138-
return refs_head_ref_namespaced(get_main_ref_store(the_repository),
1139-
fn, cb_data);
1140-
}
1141-
1142-
static int for_each_glob_ref_in(each_ref_fn fn, const char *pattern,
1143-
const char *prefix, void *cb_data)
1144-
{
1145-
return refs_for_each_glob_ref_in(get_main_ref_store(the_repository),
1146-
fn, pattern, prefix, cb_data);
1147-
}
1148-
1149-
static int for_each_glob_ref(each_ref_fn fn, const char *pattern, void *cb_data)
1150-
{
1151-
return refs_for_each_glob_ref(get_main_ref_store(the_repository),
1152-
fn, pattern, cb_data);
1153-
}
1154-
1155-
static int delete_ref(const char *msg, const char *refname,
1156-
const struct object_id *old_oid, unsigned int flags)
1157-
{
1158-
return refs_delete_ref(get_main_ref_store(the_repository), msg, refname,
1159-
old_oid, flags);
1160-
}
1161-
1162-
static struct ref_transaction *ref_transaction_begin(struct strbuf *err)
1163-
{
1164-
return ref_store_transaction_begin(get_main_ref_store(the_repository), err);
1165-
}
1166-
1167-
static int update_ref(const char *msg, const char *refname,
1168-
const struct object_id *new_oid,
1169-
const struct object_id *old_oid,
1170-
unsigned int flags, enum action_on_err onerr)
1171-
{
1172-
return refs_update_ref(get_main_ref_store(the_repository), msg, refname, new_oid,
1173-
old_oid, flags, onerr);
1174-
}
1175-
1176-
static char *shorten_unambiguous_ref(const char *refname, int strict)
1177-
{
1178-
return refs_shorten_unambiguous_ref(get_main_ref_store(the_repository),
1179-
refname, strict);
1180-
}
1181-
1182-
static int head_ref(each_ref_fn fn, void *cb_data)
1183-
{
1184-
return refs_head_ref(get_main_ref_store(the_repository), fn, cb_data);
1185-
}
1186-
1187-
static int for_each_ref(each_ref_fn fn, void *cb_data)
1188-
{
1189-
return refs_for_each_ref(get_main_ref_store(the_repository), fn, cb_data);
1190-
}
1191-
1192-
static int for_each_ref_in(const char *prefix, each_ref_fn fn, void *cb_data)
1193-
{
1194-
return refs_for_each_ref_in(get_main_ref_store(the_repository), prefix, fn, cb_data);
1195-
}
1196-
1197-
static int for_each_fullref_in(const char *prefix,
1198-
const char **exclude_patterns,
1199-
each_ref_fn fn, void *cb_data)
1200-
{
1201-
return refs_for_each_fullref_in(get_main_ref_store(the_repository),
1202-
prefix, exclude_patterns, fn, cb_data);
1203-
}
1204-
1205-
static int for_each_namespaced_ref(const char **exclude_patterns,
1206-
each_ref_fn fn, void *cb_data)
1207-
{
1208-
return refs_for_each_namespaced_ref(get_main_ref_store(the_repository),
1209-
exclude_patterns, fn, cb_data);
1210-
}
1211-
1212-
static int for_each_rawref(each_ref_fn fn, void *cb_data)
1213-
{
1214-
return refs_for_each_rawref(get_main_ref_store(the_repository), fn, cb_data);
1215-
}
1216-
1217-
static const char *resolve_ref_unsafe(const char *refname, int resolve_flags,
1218-
struct object_id *oid, int *flags)
1219-
{
1220-
return refs_resolve_ref_unsafe(get_main_ref_store(the_repository), refname,
1221-
resolve_flags, oid, flags);
1222-
}
1223-
1224-
static int create_symref(const char *ref_target, const char *refs_heads_master,
1225-
const char *logmsg)
1226-
{
1227-
return refs_create_symref(get_main_ref_store(the_repository), ref_target,
1228-
refs_heads_master, logmsg);
1229-
}
1230-
1231-
static int for_each_reflog(each_reflog_fn fn, void *cb_data)
1232-
{
1233-
return refs_for_each_reflog(get_main_ref_store(the_repository), fn, cb_data);
1234-
}
1235-
1236-
static int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn,
1237-
void *cb_data)
1238-
{
1239-
return refs_for_each_reflog_ent_reverse(get_main_ref_store(the_repository),
1240-
refname, fn, cb_data);
1241-
}
1242-
1243-
static int for_each_reflog_ent(const char *refname, each_reflog_ent_fn fn,
1244-
void *cb_data)
1245-
{
1246-
return refs_for_each_reflog_ent(get_main_ref_store(the_repository), refname,
1247-
fn, cb_data);
1248-
}
1249-
1250-
static int reflog_exists(const char *refname)
1251-
{
1252-
return refs_reflog_exists(get_main_ref_store(the_repository), refname);
1253-
}
1254-
1255-
static int safe_create_reflog(const char *refname, struct strbuf *err)
1256-
{
1257-
return refs_create_reflog(get_main_ref_store(the_repository), refname,
1258-
err);
1259-
}
1260-
1261-
static int delete_reflog(const char *refname)
1262-
{
1263-
return refs_delete_reflog(get_main_ref_store(the_repository), refname);
1264-
}
1265-
1266-
static int reflog_expire(const char *refname,
1267-
unsigned int flags,
1268-
reflog_expiry_prepare_fn prepare_fn,
1269-
reflog_expiry_should_prune_fn should_prune_fn,
1270-
reflog_expiry_cleanup_fn cleanup_fn,
1271-
void *policy_cb_data)
1272-
{
1273-
return refs_reflog_expire(get_main_ref_store(the_repository),
1274-
refname, flags,
1275-
prepare_fn, should_prune_fn,
1276-
cleanup_fn, policy_cb_data);
1277-
}
1278-
1279-
static int delete_refs(const char *msg, struct string_list *refnames,
1280-
unsigned int flags)
1281-
{
1282-
return refs_delete_refs(get_main_ref_store(the_repository), msg, refnames, flags);
1283-
}
1284-
1285-
static int rename_ref(const char *oldref, const char *newref, const char *logmsg)
1286-
{
1287-
return refs_rename_ref(get_main_ref_store(the_repository), oldref, newref, logmsg);
1288-
}
1289-
1290-
static int copy_existing_ref(const char *oldref, const char *newref, const char *logmsg)
1291-
{
1292-
return refs_copy_existing_ref(get_main_ref_store(the_repository), oldref, newref, logmsg);
1293-
}
1294-
#endif
1295-
12961089
#endif /* REFS_H */

0 commit comments

Comments
 (0)