From 182026041dd083a3f5bbdeb23e894bfe33f79f58 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Thu, 22 Oct 2026 17:11:16 +0200 Subject: [PATCH 1/2] Ability to use git refs migrate --ref-format=reftable --- ObjectiveGit/GTOID.m | 1 + ObjectiveGit/GTObject.h | 5 +++-- ObjectiveGit/GTRepository.h | 1 + script/update_libgit2 | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ObjectiveGit/GTOID.m b/ObjectiveGit/GTOID.m index 23412df4a..45d4741ef 100644 --- a/ObjectiveGit/GTOID.m +++ b/ObjectiveGit/GTOID.m @@ -10,6 +10,7 @@ #import "NSError+Git.h" #import "git2/errors.h" +#import "git2/deprecated.h" #import "git2/odb.h" @interface GTOID () { diff --git a/ObjectiveGit/GTObject.h b/ObjectiveGit/GTObject.h index e562e8dc9..e8762eb28 100644 --- a/ObjectiveGit/GTObject.h +++ b/ObjectiveGit/GTObject.h @@ -37,8 +37,9 @@ typedef NS_ENUM(int, GTObjectType) { GTObjectTypeTree = GIT_OBJECT_TREE, /**< A tree (directory listing) object. */ GTObjectTypeBlob = GIT_OBJECT_BLOB, /**< A file revision object. */ GTObjectTypeTag = GIT_OBJECT_TAG, /**< An annotated tag object. */ - GTObjectTypeOffsetDelta = GIT_OBJECT_OFS_DELTA,/**< A delta, base is given by an offset. */ - GTObjectTypeRefDelta = GIT_OBJECT_REF_DELTA, /**< A delta, base is given by object id. */ + // Pack-only types are no longer part of libgit2's public object enum. + GTObjectTypeOffsetDelta = 6, /**< A delta, base is given by an offset. */ + GTObjectTypeRefDelta = 7, /**< A delta, base is given by object id. */ }; @class GTRepository; diff --git a/ObjectiveGit/GTRepository.h b/ObjectiveGit/GTRepository.h index d1c4819cd..18948e012 100644 --- a/ObjectiveGit/GTRepository.h +++ b/ObjectiveGit/GTRepository.h @@ -36,6 +36,7 @@ #import #import #import +#import #import #import #import diff --git a/script/update_libgit2 b/script/update_libgit2 index faf306e30..ddb9debe2 100755 --- a/script/update_libgit2 +++ b/script/update_libgit2 @@ -69,6 +69,7 @@ cmake -DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_TESTS:BOOL=OFF \ -DTHREADSAFE:BOOL=ON \ -DUSE_SSH=libssh2 \ + -DUSE_GSSAPI:BOOL=OFF \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ .. cmake --build . From f2381004095eaedb7a449d146a6e53cc47fbf669 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Fri, 23 Oct 2026 16:00:54 +0200 Subject: [PATCH 2/2] Bump vendored libgit2 to v2.0.0-rc.1 for native reftable support v1.9.x does not recognize extensions.refstorage=reftable at all, so opening a repository that has been migrated with 'git refs migrate --ref-format=reftable' failed with 'unsupported extension name extensions.refstorage' even though the previous commit already adjusted GTOID/GTObject/GTRepository for the newer libgit2 API and added the USE_GSSAPI=OFF build flag. libgit2 only gained a native reftable refdb backend after 1.9, first shipping in the v2.0.0-rc.1 tag, so pin the submodule there instead. --- External/libgit2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/External/libgit2 b/External/libgit2 index 49e408b32..f28579db1 160000 --- a/External/libgit2 +++ b/External/libgit2 @@ -1 +1 @@ -Subproject commit 49e408b3208bc3093757a1c2db938d3590f3f412 +Subproject commit f28579db11737eaa2ced18498e229967a12f1c3f