Open isgulkov opened 4 years ago
Hmm, that’s a tricky one. What if the file you’re on doesn’t exist on whatever branch (master?) you might open on remote? There is already a Open Remote URL in Browser (master)
command. Is that sufficient?
I guess ideally you’d show an error dialog saying there’s no upstream branch and ask if they want to open master or \<select other branch> instead, but the UI options are pretty limited in Sublime.
So, I run "GitHub: Open Remote URL in Browser" and get an error message that the branch I'm currently editing has no upstream configured. I mean, this is true, but the behaviour is not at all what I expected.
What you can do in this case is run
git log
and find literally the next best thing. In most cases by far, it would be good enough. In fact, I can't imagine a single case where a user wouldn't expect this to happen.I'll certainly implement this myself, most likely as a patch for this plugin, but let me know (in the comments to this) if you want the PR.