open-on-github
open-on-github copied to clipboard
Picking wrong repository when opening on github
Prerequisites
The prerequisites don't make sense for a package issue.
Description
If you have opened a directory in atom, but are editing a file from a directory below that level that belongs to a different repository (via a regular clone, submodules seem to work correctly) the opened URL belongs to the wrong repository.
Steps to Reproduce
-
git clone [email protected]:atom/atom.git
-
cd atom
-
git clone [email protected]:atom/open-on-github.git
-
atom . # note that we're opening the atom directory, not open-on-github
- Open a file from the
open-on-github
clone - Activate "Open On Github: File"
Expected behavior: [What you expect to happen]
Links to requested file.
Actual behavior: [What actually happens]
Links to corrupt URL (generally a 404).
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
$ atom --version
Atom : 1.17.2
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0
$ apm --version
apm 1.17.0
npm 3.10.5
node 6.9.5 x64
python 2.7.12
git 2.12.2
OS X 10.12.5
- Open a file from the
open-on-github
clone
Just to ensure that we're exactly reproducing the behavior you're seeing, can you state a specific file that you're opening?
Links to corrupt URL (generally a 404).
Can you share the URL as well for additional help in diagnosing the issue?
Sure.
- Open
open-on-github/menus/open-on-github.cson
in the editor (using command-P) - Choose "Open On GitHub: File" from the command pallete
- Focus changes to a new tab in Chrome, opening
https://github.com/atom/atom/blob/master/open-on-github/menus/open-on-github.cson#L1
I'm pretty sure it's just the command that opens the directories initially that matters, e.g if I change step 4 to atom . open-on-github
(i.e explicitly opening both repo roots) following steps 5+6 gets me to https://github.com/atom/open-on-github/blob/master/menus/open-on-github.cson#L1
(the correct url).