int recno;
};
-struct expire_reflog_cb {
+struct expire_reflog_policy_cb {
FILE *newlog;
enum {
UE_NORMAL,
* the expire_limit and queue them back, so that the caller can call
* us again to restart the traversal with longer expire_limit.
*/
-static void mark_reachable(struct expire_reflog_cb *cb)
+static void mark_reachable(struct expire_reflog_policy_cb *cb)
{
struct commit *commit;
struct commit_list *pending;
cb->mark_list = leftover;
}
-static int unreachable(struct expire_reflog_cb *cb, struct commit *commit, unsigned char *sha1)
+static int unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, unsigned char *sha1)
{
/*
* We may or may not have the commit yet - if not, look it
const char *email, unsigned long timestamp, int tz,
const char *message, void *cb_data)
{
- struct expire_reflog_cb *cb = cb_data;
+ struct expire_reflog_policy_cb *cb = cb_data;
struct commit *old, *new;
if (timestamp < cb->cmd->expire_total)
const char *email, unsigned long timestamp, int tz,
const char *message, void *cb_data)
{
- struct expire_reflog_cb *cb = cb_data;
+ struct expire_reflog_policy_cb *cb = cb_data;
if (cb->cmd->rewrite)
osha1 = cb->last_kept_sha1;
return 0;
}
-static int push_tip_to_list(const char *refname, const unsigned char *sha1, int flags, void *cb_data)
+static int push_tip_to_list(const char *refname, const unsigned char *sha1,
+ int flags, void *cb_data)
{
struct commit_list **list = cb_data;
struct commit *tip_commit;
static void reflog_expiry_prepare(const char *refname,
const unsigned char *sha1,
- struct expire_reflog_cb *cb)
+ struct expire_reflog_policy_cb *cb)
{
if (!cb->cmd->expire_unreachable || !strcmp(refname, "HEAD")) {
cb->tip_commit = NULL;
}
}
-static void reflog_expiry_cleanup(struct expire_reflog_cb *cb)
+static void reflog_expiry_cleanup(struct expire_reflog_policy_cb *cb)
{
if (cb->unreachable_expire_kind != UE_ALWAYS) {
if (cb->unreachable_expire_kind == UE_HEAD) {
unsigned int flags, struct cmd_reflog_expire_cb *cmd)
{
static struct lock_file reflog_lock;
- struct expire_reflog_cb cb;
+ struct expire_reflog_policy_cb cb;
struct ref_lock *lock;
char *log_file;
int status = 0;