mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
Merge branch 'bc/c23' into next
C23 compatibility updates. * bc/c23: reflog: rename unreachable index-pack: rename struct thread_local
This commit is contained in:
commit
bd29255bf3
@ -100,7 +100,7 @@ static LIST_HEAD(done_head);
|
||||
static size_t base_cache_used;
|
||||
static size_t base_cache_limit;
|
||||
|
||||
struct thread_local {
|
||||
struct thread_local_data {
|
||||
pthread_t thread;
|
||||
int pack_fd;
|
||||
};
|
||||
@ -123,7 +123,7 @@ static struct object_entry *objects;
|
||||
static struct object_stat *obj_stat;
|
||||
static struct ofs_delta_entry *ofs_deltas;
|
||||
static struct ref_delta_entry *ref_deltas;
|
||||
static struct thread_local nothread_data;
|
||||
static struct thread_local_data nothread_data;
|
||||
static int nr_objects;
|
||||
static int nr_ofs_deltas;
|
||||
static int nr_ref_deltas;
|
||||
@ -161,7 +161,7 @@ static const char *curr_pack;
|
||||
static struct oidset local_links = OIDSET_INIT;
|
||||
static int record_local_links;
|
||||
|
||||
static struct thread_local *thread_data;
|
||||
static struct thread_local_data *thread_data;
|
||||
static int nr_dispatched;
|
||||
static int threads_active;
|
||||
|
||||
@ -403,7 +403,7 @@ static NORETURN void bad_object(off_t offset, const char *format, ...)
|
||||
(uintmax_t)offset, buf);
|
||||
}
|
||||
|
||||
static inline struct thread_local *get_thread_data(void)
|
||||
static inline struct thread_local_data *get_thread_data(void)
|
||||
{
|
||||
if (HAVE_THREADS) {
|
||||
if (threads_active)
|
||||
@ -414,7 +414,7 @@ static inline struct thread_local *get_thread_data(void)
|
||||
return ¬hread_data;
|
||||
}
|
||||
|
||||
static void set_thread_data(struct thread_local *data)
|
||||
static void set_thread_data(struct thread_local_data *data)
|
||||
{
|
||||
if (threads_active)
|
||||
pthread_setspecific(key, data);
|
||||
|
4
reflog.c
4
reflog.c
@ -210,7 +210,7 @@ static void mark_reachable(struct expire_reflog_policy_cb *cb)
|
||||
cb->mark_list = leftover;
|
||||
}
|
||||
|
||||
static int unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid)
|
||||
static int is_unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid)
|
||||
{
|
||||
/*
|
||||
* We may or may not have the commit yet - if not, look it
|
||||
@ -265,7 +265,7 @@ int should_expire_reflog_ent(struct object_id *ooid, struct object_id *noid,
|
||||
return 1;
|
||||
case UE_NORMAL:
|
||||
case UE_HEAD:
|
||||
if (unreachable(cb, old_commit, ooid) || unreachable(cb, new_commit, noid))
|
||||
if (is_unreachable(cb, old_commit, ooid) || is_unreachable(cb, new_commit, noid))
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user