This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

LibGit2GitHistoryReader Pennington.TranslationAudit

IGitHistoryReader backed by LibGit2Sharp. Holds the repository open for the process lifetime and serializes access through a single instance because Repository is not thread-safe.

Constructors

LibGit2GitHistoryReader

#
public LibGit2GitHistoryReader(string repositoryRoot, ILogger<LibGit2GitHistoryReader> logger)

Opens the repository at repositoryRoot, falling back to a no-op reader when no repo is found.

Parameters

repositoryRoot string
logger ILogger<LibGit2GitHistoryReader>

Methods

Dispose

#
public void Dispose()

GetLatestCommit

#
public CommitInfo GetLatestCommit(string absoluteFilePath)

Returns the latest commit touching absoluteFilePath, or null when the file is untracked or the repo is missing.

Parameters

absoluteFilePath string

Returns

CommitInfo

Pennington.TranslationAudit.LibGit2GitHistoryReader

namespace Pennington.TranslationAudit;

/// IGitHistoryReader backed by LibGit2Sharp. Holds the repository open for the process lifetime and serializes access through a single instance because Repository is not thread-safe.
public class LibGit2GitHistoryReader
{
    
public void Dispose()
; /// Returns the latest commit touching absoluteFilePath, or null when the file is untracked or the repo is missing.
public CommitInfo GetLatestCommit(string absoluteFilePath)
; /// Opens the repository at repositoryRoot, falling back to a no-op reader when no repo is found.
public LibGit2GitHistoryReader(string repositoryRoot, ILogger<LibGit2GitHistoryReader> logger)
; }