libgit2/libgit2 — Issue #495: Retrieve history for given file
Author: shytikov
Created: 2011-11-25 13:26:51+00:00
State: open

Hi All,

At the moment I'm missing one (actually a plenty of them ;) feature in `libgit2`: something similar to `git log --follow FILENAME`. I hacked around the code and haven't found a way how it might be done in easy way. So I decided to implement it by myself.

At the moment I'm confused by two approaches I see:

* It will be two step process.
1. Using `revision walking` the list of commits affected the file will be created;
2. All commits except given will be hidden by `git_revwalk_hide`;

* It will be one step process.
1. Make somehow `revision walking` recognize filtering by file name and it file SHA.

First approach looks more consistent with code currently implemented, and second approach, despite greater impact to the code looks more consistent to me.

May some experienced libgit2 guru share his vision on this task? Many thanks in advance!