-
Notifications
You must be signed in to change notification settings - Fork 19
Description
git-peek seems to open the master branch, but if a repo has a non-master default branch this ends up opening the "wrong" branch, and it's not immediately obvious how to open the "correct" branch.
Take this repo as an example: https://github.com/jdiwnab/OrbitSim
- The default branch is "gh-pages".
- Running
git-peek https://github.com/jdiwnab/OrbitSimresults in the editor being opened to a very sparse repo, since git-peek is opening https://github.com/jdiwnab/OrbitSim/tree/master. - This experience doesn't match what we see when landing on https://github.com/jdiwnab/OrbitSim , and made me wonder if git-peek was still in the process of cloning the repo or if there was a bug.
The way to open the default branch is to run git-peek https://github.com/jdiwnab/OrbitSim/tree/gh-pages. But this is a url that needs to be constructed manually, as GH doesn't seem to expose it in the UI: the url for the gh-pages branch is just https://github.com/jdiwnab/OrbitSim
It would be nice if git-peek accepted a "branch" parameter or opened the default branch of the repo.