{"issue":{"state":"open","created_at":"2011-11-18T11:45:36Z","updated_at":"2011-11-24T10:35:42Z","comments":5,"user":{"gravatar_id":"45a24110d5fea2d2ed6ae414623941c1","id":1119693,"url":"https://api.github.com/users/Flonix","login":"Flonix","avatar_url":"https://secure.gravatar.com/avatar/45a24110d5fea2d2ed6ae414623941c1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi @all.\r\n\r\nI'm searching for a method that will return the last commit that affected a given file.\r\n\r\nI looked through the API but I did not find a method that seems to do it.\r\n\r\nFirst question: Was the solution overlooked?\r\nSecond question: How to get the last commit?\r\n\r\nThanks.","assignee":null,"id":2279309,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":89,"labels":[],"title":"Question: How to get the last commit that affected a given file","closed_at":null,"html_url":"https://github.com/libgit2/libgit2sharp/issues/89","milestone":null,"url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/89"},"action":"created","comment":{"created_at":"2011-11-24T10:35:42Z","updated_at":"2011-11-24T10:35:42Z","user":{"gravatar_id":"22b99950c3244125a6de0dfdc2895eeb","id":1185905,"url":"https://api.github.com/users/shytikov","login":"shytikov","avatar_url":"https://secure.gravatar.com/avatar/22b99950c3244125a6de0dfdc2895eeb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"@Flonix, @nulltoken \r\n\r\nI've spent evening analyzing the code (it was marvelous time, it really was!) and come up with following questions to you:\r\n\r\n* To do everything right, we need to implement this on C level an commit to **libgit2** repository, but this will take time (and walking on thin ice of C). Is this ideologically right to make updates to **libgit2sharp** library only?\r\n* Even if we decide to update **libgit2sharp** only there is a question, should we implement filtering on file name as part of commit filter class (used in **QueryBy** method of **Commits** collection) which is more close to **libgit2** ideology, or put filtering by file name as property *History* or *Commits* (for example) of **IndexEntry** object, which will be more like object-oriented approach?\r\n\r\nI'm confused a lot, since updating **QueryBy** method leads either to ugly code (implementation IEnumerable just passes calls to C backend and it will be hard to change its behavior to meet our needs), or **IndexEntry** updating will make **libgit2sharp** not so thin proxy to C backend...\r\n\r\nCan you share your thought?","id":2861117,"url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/comments/2861117"}}