From 312c2f287ad961cfbc8e5b34e0b2ece6e81fcf2c Mon Sep 17 00:00:00 2001 From: Gonen <830775+goneng@users.noreply.github.com> Date: Mon, 21 Sep 2026 00:22:34 +0300 Subject: [PATCH 1/2] Fix the merge file input being initialized as merge options The libgit2 1.x rename touched three call sites in this function and the middle one landed on the options initializer instead of the input one. * Call git_merge_file_input_init for ourInput, matching the ancestor and their-side call sites on either side of it. * Stop overrunning the stack object: the options initializer memcpy's a 48 byte template over a 40 byte git_merge_file_input. Both structs open with a version field of 1, so the version check passed and the mismatch went unreported. --- ObjectiveGit/GTRepository+Merging.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveGit/GTRepository+Merging.m b/ObjectiveGit/GTRepository+Merging.m index 3832024f6..5bfd3abac 100644 --- a/ObjectiveGit/GTRepository+Merging.m +++ b/ObjectiveGit/GTRepository+Merging.m @@ -199,7 +199,7 @@ - (NSString * _Nullable)contentsOfDiffWithAncestor:(GTIndexEntry *)ancestor ourS // initialize our merge file input git_merge_file_input ourInput; - gitError = git_merge_file_options_init(&ourInput, GIT_MERGE_FILE_INPUT_VERSION); + gitError = git_merge_file_input_init(&ourInput, GIT_MERGE_FILE_INPUT_VERSION); if (gitError != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to create merge file input for our side"]; return nil; From 1e142e0786212c394e233b0beaa6d2fccc328987 Mon Sep 17 00:00:00 2001 From: Gonen <830775+goneng@users.noreply.github.com> Date: Mon, 21 Sep 2026 00:22:34 +0300 Subject: [PATCH 2/2] Fix GTCredential declaring an accessor that does not exist The libgit2 type rename reached every use of git_cred in the file except the property itself, leaving the header promising a method that nothing implements. * Rename the private property to git_credential so its synthesized getter satisfies the declaration in GTCredential.h, and update the two places that read it. * Restore the public accessor: sending -git_credential to a GTCredential raised an unrecognized selector, and the framework built with a -Wincomplete-implementation warning. --- ObjectiveGit/GTCredential.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ObjectiveGit/GTCredential.m b/ObjectiveGit/GTCredential.m index d996f17bc..d7f1a0ad8 100644 --- a/ObjectiveGit/GTCredential.m +++ b/ObjectiveGit/GTCredential.m @@ -40,7 +40,7 @@ - (GTCredential *)credentialForType:(GTCredentialType)type URL:(NSString *)URL u @end @interface GTCredential () -@property (nonatomic, assign, readonly) git_credential *git_cred; +@property (nonatomic, assign, readonly) git_credential *git_credential; @end @implementation GTCredential @@ -91,7 +91,7 @@ - (instancetype)initWithGitCred:(git_credential *)cred { if (self == nil) return nil; - _git_cred = cred; + _git_credential = cred; return self; } @@ -119,6 +119,6 @@ int GTCredentialAcquireCallback(git_credential **cred, const char *url, const ch return GIT_ERROR; } - *cred = gtCred.git_cred; + *cred = gtCred.git_credential; return GIT_OK; }