Skip to content

GitLog() for sub directory #3107

Feb 9, 2021 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Cake.Git is basically just a wrapper around LibGit2Sharp. As a workaround if there's currently no alias available you can use LibGit2Sharp directly, after adding the Cake.Git addin:

using (var repo = new Repository(@"c:\repos\myrepo"))
{
    IEnumerable<LogEntry> history = repo.Commits.QueryBy(@"mysubfolder");
}

As a second step you can provide a PR to Cake.Git to add an alias around the specific functionality, and once this is merged and released, you can remove the direct calls to LibGit2Sharp in your script, with the alias from Cake.Git.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@snarum
Comment options

Comment options

You must be logged in to vote
2 replies
@snarum
Comment options

@pascalberger
Comment options

Answer selected by snarum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants