Merge branch 'jk/prune-mtime' into maint
Access to objects in repositories that borrow from another one on a slow NFS server unnecessarily got more expensive due to recent code becoming more cautious in a naive way not to lose objects to pruning. * jk/prune-mtime: sha1_file: only freshen packs once per run sha1_file: freshen pack objects before loose reachable: only mark local objects as recent
This commit is contained in:
9
cache.h
9
cache.h
@ -1174,6 +1174,7 @@ extern struct packed_git {
|
||||
int pack_fd;
|
||||
unsigned pack_local:1,
|
||||
pack_keep:1,
|
||||
freshened:1,
|
||||
do_not_close:1;
|
||||
unsigned char sha1[20];
|
||||
/* something like ".git/objects/pack/xxxxx.pack" */
|
||||
@ -1289,14 +1290,16 @@ int for_each_loose_file_in_objdir_buf(struct strbuf *path,
|
||||
|
||||
/*
|
||||
* Iterate over loose and packed objects in both the local
|
||||
* repository and any alternates repositories.
|
||||
* repository and any alternates repositories (unless the
|
||||
* LOCAL_ONLY flag is set).
|
||||
*/
|
||||
#define FOR_EACH_OBJECT_LOCAL_ONLY 0x1
|
||||
typedef int each_packed_object_fn(const unsigned char *sha1,
|
||||
struct packed_git *pack,
|
||||
uint32_t pos,
|
||||
void *data);
|
||||
extern int for_each_loose_object(each_loose_object_fn, void *);
|
||||
extern int for_each_packed_object(each_packed_object_fn, void *);
|
||||
extern int for_each_loose_object(each_loose_object_fn, void *, unsigned flags);
|
||||
extern int for_each_packed_object(each_packed_object_fn, void *, unsigned flags);
|
||||
|
||||
struct object_info {
|
||||
/* Request */
|
||||
|
Reference in New Issue
Block a user