libgit2 / objective-git

Objective-C bindings to libgit2
MIT License
1.16k stars 280 forks source link

How to read file content from some specific commit ? #702

Closed palmoff closed 4 years ago

palmoff commented 4 years ago

Hi all,

I need to read content of file at moment of some exact commit.

Im geting blob: GTBlob *blob = [repo lookUpObjectBySHA:@"95600821702dcbd7d7912a9265fa4992e7508c7c" objectType:GTObjectTypeBlob error:NULL];

But [blob content] gives me always the last version of file. How can I get file state at different times (commits) ?