Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. WalkHistory(repo.HEAD.Commit); // Walk history from HEAD
  2. WalkHistory(repo.Branches["experimental"].Commit); // Walk history from branch
  3.  
  4.  
  5. private void WalkHistory(Commit commit)
  6. {
  7. Console.WriteLine("SHA: " + commit.SHA);
  8. Console.WriteLine("Committed on: " + commit.CommittedDate);
  9. Console.WriteLine("By: " + commit.Committer);
  10.  
  11. if (commit.HasParents)
  12. {
  13. foreach(Commit parent in commit.Parent)
  14. WalkHistory(parent);
  15. }
  16. }
Add Comment
Please, Sign In to add comment