core: Add dynamic uncompressed object cache for archive-z
This gives us something closer to the advantages of archive and archive-z when using the latter. Concretely we get deduplication among multiple checkouts, along with the "devino" hash table trick during commits to avoid checksumming content again. This is enabled by default.
This commit is contained in:
1 parent
3c0fe01152
commit
ee73c0fa34
4 files changed
+220
-15
No files matched your search
@@ -57,6 +57,7 @@ ot_gfile_ensure_directory (GFile *dir,
|
||||
gboolean ret = FALSE;
|
||||
GError *temp_error = NULL;
|
||||
|
||||
again:
|
||||
if (with_parents)
|
||||
ret = g_file_make_directory_with_parents (dir, NULL, &temp_error);
|
||||
else
|
||||
@@ -71,6 +72,11 @@ ot_gfile_ensure_directory (GFile *dir,
|
||||
else
|
||||
g_clear_error (&temp_error);
|
||||
}
|
||||
/* Work around glib bug where if multiple threads/processes race in
|
||||
* _with_parents, it can error out early
|
||||
*/
|
||||
if (with_parents && !g_file_query_exists (dir, NULL))
|
||||
goto again;
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
|
||||
Reference in new issue
Block a user