Re:A simple, kernel-space, on-disk filesystem from scratch
by michh on Saturday March 29, 2014 @10:01AM
(#7492237)
> Every commit has a single parent, making a previous button trivial.
Until, of course, you hit a merge commit. Which most projects have a lot of regardless of whether that's a good thing. I suppose you could always pick the parent which is on the same branch, but still.
The implementation probably just involves walking backwards through history until you reach the initial commit, maintaining a bidirectional linked list as you go.
Github already allows users to walk forward and backward though history via the commits page[0]. It seems reasonable to provide the same "Newer", "Older" buttons when viewing an individual commit.
[0]: https://github.com/torvalds/linux/commits/master?page=1