Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Repos not detected if they are subfolders #312

Open
bkromhout opened this issue Nov 6, 2015 · 4 comments
Open

Repos not detected if they are subfolders #312

bkromhout opened this issue Nov 6, 2015 · 4 comments

Comments

@bkromhout
Copy link

I recently reorganized some of my repos that I have for school so that instead of them being all separate folders in my Dev folder:

Dev\CSC230
Dev\CSC246
Dev\CSC236
...

They are now all under a Dev\School\ folder:

Dev\School\CSC230
Dev\School\CSC246
Dev\School\CSC236
...

This way, I can just add the School folder to Atom as a project folder, rather than adding all of the course folders individually.

However, I've found that, now that School is the folder in the project sidebar, the course folders don't get detected as git repos.

I assume this means that git-plus doesn't check past the top-level folders in the project sidebar for the presence of .git folders (or something).

Is there a setting that I'm missing that would enable this feature, or is it simply not possible without a change on your side? If that is the case, consider this a friendly request for this functionality :)

@akonwi
Copy link
Owner

akonwi commented Nov 6, 2015

Unfortunately Atom doesn't work this way. Initally, an atom project could only have one root directory and if it was a repo, awesome. Otherwise no git functionality. Now, a window can have multiple root directories but they still work the same way. If these roots are repos, then atom will treat them as such. This package used to get around that by trying to find the git context around each open file. That is very expensive though and lead to poor performance and required a lot of extra work.

With the release of atom 1.0, there were api's for packages to get the repos of a project based on what root directories were open. I switched to using that because it was lightweight and more official. The trade-off is that the package now only allows doing git where atom notices git, which unfortunately isn't everywhere.

#280 is similar to this and I've been thinking of a clean way to do it. I think the best solution is for the atom api to do this inherently for packages to consume. I might have to make a pull request to get this functionality

@bkromhout
Copy link
Author

That does sound like it would be the easiest way... If you do end up going that route, it'd be great if you could add a link to that pull request here, just for posterity.

@akonwi
Copy link
Owner

akonwi commented Nov 11, 2015

👍

@akonwi
Copy link
Owner

akonwi commented Mar 16, 2016

Updated link to atom issue (atom/atom#2203)

This was referenced Nov 1, 2016
@FeStoS FeStoS mentioned this issue Jul 1, 2018
Closed
@lilian0807 lilian0807 mentioned this issue Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants