|
|
|
|
|
by michh
4461 days ago
|
|
Previous/Next is a bit complicated if one of the key features of the versioning system you're using is that it's a graph. Of course, that graph could easily be flattened (e.g. simply sort by date) but that'd cause you to jump all over the graph. It would make for a terrible and confusing user experience as the next commit is suddenly based on a state of the code you saw 20 steps ago. As it would only work properly for projects with a completely linear history (which most projects don't have) I can understand Github not adding this feature. I'd say this is something a third party app using the Github API could do very well for projects specifically set up for learning through their history (like this one). |
|
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