Created
December 11, 2008 23:01
-
-
Save pheew/34922 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WalkHistory(repo.HEAD.Commit); // Walk history from HEAD | |
WalkHistory(repo.Branches["experimental"].Commit); // Walk history from branch | |
private void WalkHistory(Commit commit) | |
{ | |
Console.WriteLine("SHA: " + commit.SHA); | |
Console.WriteLine("Committed on: " + commit.CommittedDate); | |
Console.WriteLine("By: " + commit.Committer); | |
if (commit.HasParents) | |
{ | |
foreach(Commit parent in commit.Parent) | |
WalkHistory(parent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment