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

[CLOSED] .git directory in the project tree after using FileSystem.resolve #9027

Open
core-ai-bot opened this issue Aug 30, 2021 · 8 comments

Comments

@core-ai-bot
Copy link
Member

Issue by zaggino
Tuesday Dec 16, 2014 at 03:41 GMT
Originally opened as adobe/brackets#10183


Since installing Brackets.Release.1.1.msi I keep seeing .git folder in my project tree, which wasn't there before (and shouldn't be as no-one should ever touch that directory manually). Core is linked to the latest master branch.
image

@core-ai-bot
Copy link
Member Author

Comment by cheesypoof
Tuesday Dec 16, 2014 at 04:39 GMT


Are you sure this is not an extension issue@zaggino? As soon as I upgraded my brackets-git from 0.14.5 to 0.14.6 I noticed this as well. I am not using the new shell by the way.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Tuesday Dec 16, 2014 at 04:48 GMT


There was this change which might have caused the issue: brackets-userland/brackets-git@d609a3a

But I don't think it should. I also noticed that if you do right click > refresh file tree .git directory disappears for a while and then pops back again.

I had to stop using brackets.fs so the Intel XDK which has different FileSystem implementation would continue to work with this extension. There should really be a way to resolve a file or directory without pushing the path to the index of file watching features.

@core-ai-bot
Copy link
Member Author

Comment by busykai
Tuesday Dec 16, 2014 at 13:29 GMT


I will take a look at it. I agree with@zaggino -- resolving an fs entry in the project should not impact the tree model. there's an exclusion list, but apparently it's not applied at all times or something. I'll root cause this and will get back.

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Tuesday Dec 16, 2014 at 21:07 GMT


@zaggino You shouldn't access .git via the FileSystem, that's what brackets-userland/brackets-git#436 is all about.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Tuesday Dec 16, 2014 at 21:34 GMT


Forgot about that one@MarcelGerber , thanks.
Then there's this one brackets-userland/brackets-git#853
I really need a way to check for .git with a proper API without the automatic indexing ... or at least be able to access index to remove it manually after check ...

@core-ai-bot
Copy link
Member Author

Comment by busykai
Tuesday Dec 16, 2014 at 21:42 GMT


there are two issues, i guess:

  1. we don't want to watch for fs events in auxiliary files (such .git). there's an API, actually, to at least unwatch an entry within a watched root, but it's private (for a reason).@MarcelGerber, do you see the issue Accessing .git folder through Brackets file system adds it to the index and breaks Brackets brackets-userland/brackets-git#436 with the current version of brackets-git?
  2. the issue is this what this report describes: it seems like FileSystem.resolve() adds entry to ProjectModel even if it is, in theory, excluded.

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Saturday Dec 20, 2014 at 19:16 GMT


Yeah, I see brackets-userland/brackets-git#436 again with brackets-git installed.
Luckily, a simple workaround is to add .git to the exclusion list.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Thursday Jan 08, 2015 at 23:45 GMT


I left a very long comment in the PR with ideas about fixing, but one clarification on the discussion in this thread... Re@busykai's comment "there's an API, actually, to at least unwatch an entry within a watched root, but it's private (for a reason)": it's not actually possible on Mac or Win to unwatch a subset of a watched root. The native watching API we use watches an entire subtree with no ability to exclude parts of it. The private _unwatchEntry() API is only ever called on the watch root or on entries that have been deleted (for cleanup).

And even adding watches is very basic & limited right now: early on we talked about the public FileSystem.watch() supporting overlapping file tree regions, but that was never implemented. In theory we do support multiple non-overlapping watch roots, but then that has never really been tested :-) (So note, for example, that opened files from outside the project aren't currently watched, nor is the prefs JSON file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant