Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Ignore .git directory in find/replace #10293

Closed
lrebrown opened this issue Jan 1, 2015 · 12 comments
Closed

Ignore .git directory in find/replace #10293

lrebrown opened this issue Jan 1, 2015 · 12 comments

Comments

@lrebrown
Copy link

lrebrown commented Jan 1, 2015

Find and replace 'in files' functions currently search inside of .git directories. I think the .git directory should be ignored by these functions. It adds what are surely always irrelevant results, and could be dangerous in the case of replace.

(I'm using the 'brackets git' extension, but I'm making an assumption that this issue should be addressed in brackets directly).

@peterflynn
Copy link
Member

@lrebrown Brackets should automatically screen out .git folders. If you try Debug > Reload Without Extensions, do you still see the same search results, or is it correctly filtered out in that case?

@lrebrown
Copy link
Author

lrebrown commented Jan 3, 2015

Well, before I can answer that I need to find an example search string that does it. The problem has been occurring quite a lot, alongside other issues, but it doesn't happen on every find/replace and I'm struggling right now to get it to happen so I can answer you.

Just in case it's at all relevant, I'll briefly mention other issues I keep facing, which I haven't reported at all yet:

  • Sometimes on scrolling upwards, it keeps jumping back downwards. I can either battle with it, or ctrl+home to the top and scroll down instead.
  • I have a set of commits I've been working on recently for which I keep doing some rebasing (done externally to brackets). This often results in wrong versions of files being presented to me in brackets afterwards, and I have to force a refresh with F5 to sort it out.
  • A set of ~3 node connection errors appearing. This was happening quiet a bit with v1.0, but much less with v1.1, possibly just the once to the best of my recollection.

btw, the 'brackets git' extension is the only one I'm using, I'm using brackets v1.1 and on Windows with git 1.9.5.

@lrebrown
Copy link
Author

lrebrown commented Jan 3, 2015

Okay, it just occurred. I searched for the string 'export', clicked on one of the results, and then suddenly a .git entry was added to the search results. The entry is titled 'HEAD - .git/logs/'.

Also, I forgot to mention, as I'm browsing through search results and clicking on items, sometimes the git log search entry refreshes or something, re-opening itself if I collapsed it, bringing itself into focus, which is really irritating and disruptive.

To begin testing, I just closed the search results, then re-searched with the same string and the same thing happened. Second test, I just closed that search result, and searched for something completely different, and it happened again, though fewer entries for it. (I am not yet certain whether when this does not occur as in previous post that it's due to lack of results in the git log, or that its only occurring under some unknown conditions).

Oh, important to mention, the .git entry is not immediately present in the results. I collapse a few headings as I go through the list, and click on one or two, then it suddenly adds it.

Next I used F5 to force a refresh, and it still happens. I closed and reopened brackets, still happens.

Reloaded without extensions as advised, same search string, DOES NOT HAPPEN! Reloaded with extensions, tried again, re-occurs!

So obviously it seems that the extension is causing this.

@busykai
Copy link
Contributor

busykai commented Jan 3, 2015

This is a know issue of Brackets-git inflicted by this one: #10183 (which, in turn, showed up because of ask to get rid of use of brackets.fs).

@redmunds
Copy link
Contributor

redmunds commented Jan 3, 2015

Sometimes on scrolling upwards, it keeps jumping back downwards.

Is this the same as #9632 ?

I have a set of commits I've been working on recently for which I keep doing some rebasing (done externally to brackets). This often results in wrong versions of files being presented to me in brackets afterwards, and I have to force a refresh with F5 to sort it out.
A set of ~3 node connection errors appearing. This was happening quiet a bit with v1.0, but much less with v1.1, possibly just the once to the best of my recollection.

For these other issues, it's much easier for us to track then logged as separate issues. These sound familiar, so please search through Brackets issues to see if you can find an existing one. If so, then add your comments, otherwise please file a new issue with a reproducible set of steps. Thanks.

@lrebrown
Copy link
Author

lrebrown commented Jan 3, 2015

Is this the same as #9632 ?

Yes, I'll post there in a moment

For these other issues, it's much easier for us to track then logged as separate issues. These sound familiar, so please search through Brackets issues to see if you can find an existing one. If so, then add your comments, otherwise please file a new issue with a reproducible set of steps. Thanks.

Obviously. As I tried to express, I was only mentioning them in case they had any relevance to diagnosing this particular issue. I haven't posted about them separately yet because its a matter of finding the time to search for existing entries and to write the posts alongside the other work I'm trying to get done. I will do so soon. Someone such as yourself familiar with the current set of issues posting the correct link is very helpful though; I'll add a comment to #9632 now.

@redmunds
Copy link
Contributor

redmunds commented Jan 3, 2015

@lrebrown Github has a halfway decent searching mechanism. Go to top of brackets main repo page and type keywords in "Search" field for "This Repository". After that, scroll back to top (not sure why it scrolls down) and click on "Issues" (as opposed to "Code"). You can further filter on "Open vs. "Closed" if desired. Also try searching in brackets-dev forum since some things are discussed and solved there before an issue is opened.

Note that all of the above should show up in search engines, so it might be easiest to just do that.

@lrebrown
Copy link
Author

lrebrown commented Jan 3, 2015

I appreciate that you're trying to be helpful, thank you, but this advice isn't needed.

@marcelgerber
Copy link
Contributor

Your issue 2 sounds like #7638, which is mostly about file system issues caused by git.

Re issue 3, if you mean the dialog, that's something shown by the Brackets Git extension. I'm seeing this sometimes as well, but most times it's not an issue caused by Brackets (as file watchers, extension manager, ... work just fine). You could file an issue over there (cc @zaggino).

@peterflynn
Copy link
Member

It sounds like we can close this as a duplicate of #10183, since the same issue is at play (FS events being emitted for excluded folders after brackets-git uses FS APIs to read those folders). And a fix is already in progress, thankfully!

If the other issues turn out not to be dupes of the other bugs cited above, then opening a new bug with further details (whenever you have time of course) would be good.

@lrebrown
Copy link
Author

lrebrown commented Jan 9, 2015

Fine with me, and will do :)

@lrebrown lrebrown closed this as completed Jan 9, 2015
@peterflynn
Copy link
Member

Cool, thanks!

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

No branches or pull requests

5 participants