【发布时间】:2016-06-22 02:44:25
【问题描述】:
以下 StackOverflow 条目说明了如何使用 libgit2sharp 从 GitHub.com 获取文本文件的最新内容: How to get file's contents on Git using LibGit2Sharp?
但我需要输入一个大概一个月前的日期时间,然后取回该日期时间的内容。我以为我有一个解决方案,但还没走多远就失败了:
// This C# fails after returning a few entries. After 10 minutes says out of memory.
IEnumerable<LogEntry> enumbLogEntries_LogEntry_qb = repo.Commits
.QueryBy("articles/sql-database/sql-database-get-started.md");
foreach (LogEntry logEntry in enumbLogEntries_LogEntry_qb)
{
Console.WriteLine(logEntry.Commit.Committer.When); // Date.
// I hope to use logEntry.Target to get the blob of content, I think.
}
我也在尝试使用 Octokit for .NET,但我只能获得最新的内容。任何解决方案将不胜感激。我承认沉重的 GIT 术语会让我无法理解答案。
【问题讨论】:
标签: git libgit2sharp octokit