Currently the script is comparing the selected Permission Set or Profile against the version on the master branch. Allow users to select the branch to compare.
Desired solution
After the selection of Profile or Permission Set present a list of possible branches. master should be the default.