core: [INCOMPATIBLE CHANGE] Re-split archive content into .file and .filecontent

This will allow us to use hard links again for user-mode checkouts,
rather than the hackish link cache.  It was pretty silly anyways to
have file objects be stored with just a small metadata header
prepended, but uncompressed.

Either they should be hardlinkable, or compressed (in pack files).
This commit is contained in:
Colin Walters committed 2012-05-04 16:10:30 -04:00
1 parent 3321fa08d7
commit 27358a8de6
7 files changed
+383 -186

No files matched your search

+17
View File
@@ -922,6 +922,23 @@ ostree_get_relative_object_path (const char *checksum,
return g_string_free (path, FALSE);
}
char *
ostree_get_relative_archive_content_path (const char *checksum)
{
GString *path;
g_assert (strlen (checksum) == 64);
path = g_string_new ("objects/");
g_string_append_len (path, checksum, 2);
g_string_append_c (path, '/');
g_string_append (path, checksum + 2);
g_string_append (path, ".filecontent");
return g_string_free (path, FALSE);
}
static char *
get_pack_name (gboolean is_meta,
gboolean is_index,