GitHub Network Graph
This script mimics the "Network Graph" display on GitHub.com in that it fetches the number of forks of a given repo and displays the distance (commits ahead or behind) it is from the upstream repository (the repository it is forked from).
The script is intended to be simple and as modular as possible without using outside dependencies. It is of course mostly a thought experiment as doing this kind of thing in bash is a bit insane.
There a few main components:
- Two functions called
get_fork_branchtake in a single argument (the index of a forked repo from the list generated by a later command) and returns the user and default branch of that fork, respectively