diff --git a/PBGitCommit.m b/PBGitCommit.m index 333aa91..36d3b09 100644 --- a/PBGitCommit.m +++ b/PBGitCommit.m @@ -26,9 +26,9 @@ NSString * const kGitXCommitType = @"commit"; NSMutableArray *p = [NSMutableArray arrayWithCapacity:nParents]; for (i = 0; i < nParents; ++i) { - char *s = git_oid_mkhex(parentShas + i); + char buff[2000]; + char * s = git_oid_to_string(buff, 2000, parentShas + i); [p addObject:[NSString stringWithUTF8String:s]]; - free(s); } return p; } @@ -127,9 +127,9 @@ NSString * const kGitXCommitType = @"commit"; - (NSString *)realSha { if (!realSHA) { - char *hex = git_oid_mkhex(&sha); + char buff[2000]; + char * hex = git_oid_to_string(buff, 2000, &sha); realSHA = [NSString stringWithUTF8String:hex]; - free(hex); } return realSHA; diff --git a/libgit2 b/libgit2 index bda29d0..74eff33 160000 --- a/libgit2 +++ b/libgit2 @@ -1 +1 @@ -Subproject commit bda29d0f7bc59a821b03c716562aef6ea3b5903a +Subproject commit 74eff33f8be680e821d9674ab12da3c0b76dad23