summaryrefslogtreecommitdiff
path: root/src/fileops.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/fileops.h
parent8f09a98e1809dcdfd9d25b8268657bac4d942e6a (diff)
downloadlibgit2-ethomson/refresh_objects.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/fileops.h')
-rw-r--r--src/fileops.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fileops.h b/src/fileops.h
index e055400be..54e3bd4e4 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -185,9 +185,10 @@ extern int git_futils_cp(
mode_t filemode);
/**
- * Set the files atime and mtime to the current time.
+ * Set the files atime and mtime to the given time, or the current time
+ * if `ts` is NULL.
*/
-extern int git_futils_touch(const char *path);
+extern int git_futils_touch(const char *path, time_t *when);
/**
* Flags that can be passed to `git_futils_cp_r`.