Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git baseFolders doesn't seem to be working on mac OS #94

Closed
codingmatty opened this issue Feb 21, 2017 · 21 comments
Closed

Git baseFolders doesn't seem to be working on mac OS #94

codingmatty opened this issue Feb 21, 2017 · 21 comments
Labels
bug good first issue Good for newcomers

Comments

@codingmatty
Copy link

I have tried a few different things, but I assume something like this was supposed to work:

"projectManager.git.baseFolders": [
    "~/Projects/"
],

or at least this:

"projectManager.git.baseFolders": [
    "/Users/<username>/Projects/"
],
@ghost
Copy link

ghost commented Feb 22, 2017

👍

@alefragnani
Copy link
Owner

Hi @codingmatty ,

Yes, it should work. It wil look for git repos inside that folder, recursively. Just remember that in Mac/Linux, the folders are _case sensitive _.

@BonDoQ , could you help me again, and test this config in your Mac 😃 ?

@alefragnani alefragnani added bug good first issue Good for newcomers labels Feb 22, 2017
@amitosdev
Copy link

Same issue here.

@nsomar
Copy link

nsomar commented Mar 5, 2017

I am facing a similar issue. When I refresh the projects its start looking but it stops and only shows a subset of the git projects I have.

Here are my settings

    "projectManager.vscode.baseFolders": [
        "/Users/.../Documents"
    ],
    "projectManager.vscode.maxDepthRecursion": 10,
    "projectManager.cacheProjectsBetweenSessions": true,
    "projectManager.showProjectNameInStatusBar": true

@amitosdev
Copy link

So, it worked for me with this setting. Just like @alefragnani wrote (sorry for the miss understanding):

"projectManager.git.baseFolders": [
        "/Users/user.name/Projects/"
    ]

@alefragnani
Copy link
Owner

Good to know @TalAmitOS 🎉

What was the catch? Case-sensitive folders?

@amitosdev
Copy link

Actually nothing new. I just replace:

"projectManager.git.baseFolders": [
    "~/Projects/"
]

With:

"projectManager.git.baseFolders": [
        "/Users/user.name/Projects/"
]

And refresh the projects list.

@alefragnani
Copy link
Owner

@codingmatty @RobertDessin @oarrabi are your git projects right at the base folder, or in any subfolder?

By the way, the detection is fairly simple. It just looks for a folder called .git with a file config inside. It does not make any kind of git repo validation/authentication. Also, if you use the cacheProjectsBetweenSessions as true, you should run the Refresh command, if you update the baseFolders setting.

Let me know if you have any success

@ghost
Copy link

ghost commented Mar 6, 2017

@alefragnani ok, cool. Actually with "projectManager.cacheProjectsBetweenSessions" : true it suddenly works. great. Thanks

@alefragnani
Copy link
Owner

@monomadic
Copy link

monomadic commented May 3, 2017

I also had this problem, and only solved it by the suggestions above, setting "projectManager.cacheProjectsBetweenSessions": true and stating the full, absolute path (including your actual username, so for me it was "/Users/rob/Projects/").

It would be great if we could add this to the documentation for the plugin, or better yet add support for ~ or $home, as dictated by the documentation currently. Also mentioning the caching requirement would help other users.

Another small thing for me was, I simply wanted a way to quickly open folders 1 level deep in my ~/Projects directory. For me, the plugin is picking up git projects but not non-git directories. I guess it's a minor annoyance as I should probably be running git init anyway, but I do have a lot of throwaway projects I never intend to check into git.

Thanks for this fantastic plugin!

@alefragnani
Copy link
Owner

Hi @RobSaunders ,

Yes, this settings xxx.baseFolders only works with full path, at least for now 😄 . The support for variables will be addressed in #88 .

About the directories that are not recognized, well, the detection is made checking for git repositories, which means that it contains .git directory with a config file inside. It don't run any git command (like init) to be sure. It is just a lazy check. There is no setting available to any kind of folder yet, and I don't know if this would be a good idea (thinking about the side effects). If you think this scenario is a must have, pleas open another issue and I could handle it with another setting.

I will close this issue now, since the use of variables for xxx.baseFolders will be treated in #88.

@pookdeveloper
Copy link

Not work for me

"projectManager.git.baseFolders": [
'/Users/davidgarcia/Desktop/ionic'
]

@alefragnani
Copy link
Owner

Hi @pookdeveloper ,

Could you provide more details about what are,you experiencing?

Does it show the Refresh notification or not? is the Side Bar visible? Are you using using the correct case for the path?

@pookdeveloper
Copy link

Hi @pookdeveloper ,

Could you provide more details about what are,you experiencing?

Does it show the Refresh notification or not? is the Side Bar visible? Are you using using the correct case for the path?

Yes @alefragnani the notification is showing but when I refresh the panel, it doesn't show the new folders of git projects.
The path that u put is putting in the terminal "pwd" of my folder that contains the projects.

Video of the behaviour: https://share.vidyard.com/watch/pthLc1K7RWeecLqYJjuUaB?

@alefragnani
Copy link
Owner

Hi @pookdeveloper ,

Are all (5) folders Git repos? Also, is any of them, or the ionic folder itself, a hard/soft link instead of regular folders?

@pookdeveloper
Copy link

Hi @pookdeveloper ,

Are all (5) folders Git repos? Also, is any of them, or the ionic folder itself, a hard/soft link instead of regular folders?

@alefragnani all are regulars folders and github projects I clone the repo using the gitkrakren app

@alefragnani
Copy link
Owner

It should work just fine. It just checks for .git/config file (no repo check/ validation btw) and returns the folder. There are only two limitations:

  • symlink
  • inside remotes

You could check Toggle Developer Tools for errors, but today there is no debug/log to turn on.

You should wait for an update to add debug/log messages

@pookdeveloper
Copy link

@alefragnani the problem is simple quote in the routeXD
NOT WORKS:
"projectManager.git.baseFolders": [
'/Users/davidgarcia/Desktop/ionic'
],

WORKS:
"projectManager.git.baseFolders": [
"/Users/davidgarcia/Desktop/ionic"
],

@pookdeveloper
Copy link

@alefragnani I can use regex? for all folders in "/Users/davidgarcia/Desktop/*", and not use:
"/Users/davidgarcia/Desktop/ionic",
"/Users/davidgarcia/Desktop/loopback",....
Thanks

@alefragnani
Copy link
Owner

That's great to see it works. I really missed that simple/double quote typo.

About regex, not yet. It's being tracked in #309. Upvote there 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants