Skip to content

GitRepo.Commits.QueryBy(fpath) fails with "Given key not present in dictionary" for some folders only on master branch! #1520

Open
@ltoshev

Description

@ltoshev

I use this code:

GitRepo = new Repository(Repository.Discover(SolutionDir));

string fpath = folder.Replace(SolutionDir, string.Empty).Replace("\", "/").TrimStart('/');

        foreach (var c in GitRepo.Commits.QueryBy(fpath).Take(1))
        {
            revisionsList.Add(folder.Split(Path.DirectorySeparatorChar).Last(), c.Commit.Committer.When.ToUnixTimeSeconds());
        }

The GitRepo.Commits.QueryBy(fpath) fails for some folders on master branch and only on master.

It works fine when you run it of a branch made from master.

I tried to get back the version of the library and found this code works in v0.22.1 from nuget.

It fails for 0.23.0, 0.23.1, 0.24.0 - all tested to fail.

If you can fix it in 0.24.1 will be great.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions