0

Im using this code to get file content of commit:

 GTBlob *blob = [repo lookUpObjectBySHA:@"d39a07ef51533a32da4bf0474462a71a40dc59e4" objectType:GTObjectTypeBlob error:NULL];
        NSLog(@"Blob: %@",[blob content]);

where SHA - some specific commit. But I always get the latest version of this file. What Im doing wrong ?

Alex
  • 36
  • 4

1 Answers1

0

I found, that to get file in some past states you need:

get GTTree from GTCommit, then get GTTreeEntry from GTTree and after that get GTBlob as GTObject via objectWithTreeEntry:GTTreeEntry

Alex
  • 36
  • 4