8000 Retrieve history for given file · Issue #495 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content
Retrieve history for given file #495
Closed
@shytikov

Description

@shytikov

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0