summaryrefslogtreecommitdiff
path: root/src/pack.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-07-22 13:34:19 -0400
committerEdward Thomson <ethomson@github.com>2016-08-04 15:12:04 -0400
commit27051d4e3134e53096b10089654a965064a77403 (patch)
tree8954ca3d25e96ebaf252d4e05de78f74ca46b591 /src/pack.h
parent8f09a98e1809dcdfd9d25b8268657bac4d942e6a (diff)
downloadlibgit2-27051d4e3134e53096b10089654a965064a77403.tar.gz
odb: only freshen pack files every 2 secondsethomson/refresh_objects
Since writing multiple objects may all already exist in a single packfile, avoid freshening that packfile repeatedly in a tight loop. Instead, only freshen pack files every 2 seconds.
Diffstat (limited to 'src/pack.h')
-rw-r--r--src/pack.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pack.h b/src/pack.h
index d15247b74..5302db5b7 100644
--- a/src/pack.h
+++ b/src/pack.h
@@ -102,6 +102,8 @@ struct git_pack_file {
git_pack_cache bases; /* delta base cache */
+ time_t last_freshen; /* last time the packfile was freshened */
+
/* something like ".git/objects/pack/xxxxx.pack" */
char pack_name[GIT_FLEX_ARRAY]; /* more */
};