summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2023-10-02 02:40:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-10-02 21:57:38 (GMT)
commit23b2c7e95b6f8f3045665835d2dc5028701eff18 (patch)
treeffc99ac1e4307004da2e31947e6806de3259319a /object.c
parent15a1ca1abe8dafa9bf3bf924b4e3c6b851717ee2 (diff)
downloadgit-23b2c7e95b6f8f3045665835d2dc5028701eff18.zip
git-23b2c7e95b6f8f3045665835d2dc5028701eff18.tar.gz
git-23b2c7e95b6f8f3045665835d2dc5028701eff18.tar.bz2
loose: add a mapping between SHA-1 and SHA-256 for loose objects
As part of the transition plan, we'd like to add a file in the .git directory that maps loose objects between SHA-1 and SHA-256. Let's implement the specification in the transition plan and store this data on a per-repository basis in struct repository. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/object.c b/object.c
index 2c61e4c..186a0a4 100644
--- a/object.c
+++ b/object.c
@@ -13,6 +13,7 @@
#include "alloc.h"
#include "packfile.h"
#include "commit-graph.h"
+#include "loose.h"
unsigned int get_max_object_index(void)
{
@@ -540,6 +541,7 @@ void free_object_directory(struct object_directory *odb)
{
free(odb->path);
odb_clear_loose_cache(odb);
+ loose_object_map_clear(&odb->loose_map);
free(odb);
}