How to find GIT repository folders

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Claudio Salvio
Posts: 13
Joined: Tue Jul 02, 2013 9:45 pm

How to find GIT repository folders

Post by Claudio Salvio »

Hello,

First of all, David, thanks again for giving us access to this useful tool.

¿Is there some way to find folders that are GIT repositories?
These folders contain a subfolder called .git

I have tried using child:.git but it also found folders containing files with .git in its name (for example: "Git v2.16.2 Release Notes.raw.github.com.website")

If it is not possible with the current functions and modifiers, I think it would be very useful to consider the possibility of adding a childfolder: function that it only returns folders that contain folders with a certain string in their name.

Regards,
Claudio
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to find GIT repository folders

Post by NotNull »

Don't know how to get this in one step, but this comes close:

Code: Select all

folder:   wfn:.git
If you exporrt the results as an EFU file and open that EFU in Everything, you now can do a

Code: Select all

child:.git
(not tested, btw)
Claudio Salvio
Posts: 13
Joined: Tue Jul 02, 2013 9:45 pm

Re: How to find GIT repository folders

Post by Claudio Salvio »

NotNull,

In line with your suggestion, I tried searching first with the expression:
folder: .git
exporting the result to an EFU file.
Then I opened the EFU file and searched with the expression:
child: .git

In this way I obtained the desired result, except for the fact that some columns did not show values ​​(for example: date of modification).

While it is true that this procedure works, unfortunately it is an uncomfortable way to obtain the desired result.

I would like to find a way to achieve it in one step.

Perhaps this objective is not possible to accomplish with the functions and modifiers that Everything currently has.

In that case, it would be very useful for David to consider adding some way to achieve it.

In my previous post I mention the creation of a childfolder: function as a possible solution.

But in truth after seeing your suggestion I remembered a proposal that occurred to me some time ago but I did not post: to add the possibility of redirecting the output of a search to another search in Everything.

As you know, redirection is a very powerful mechanism that allows you to create rich and complex expressions in a single line.

In my particular case, I have been using this mechanism every day for the last few years when I use PowerShell, although redirection certainly is not something that has arisen with this environment.

Assuming that the redirection operator in Everything were the ">" character, the search to solve this situation could be expressed as:
folder: .git> child: .git

Thank you for your collaboration.

Regards,
Claudio
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to find GIT repository folders

Post by NotNull »

Claudio Salvio wrote: But in truth after seeing your suggestion I remembered a proposal that occurred to me some time ago but I did not post: to add the possibility of redirecting the output of a search to another search in Everything.

As you know, redirection is a very powerful mechanism that allows you to create rich and complex expressions in a single line.

In my particular case, I have been using this mechanism every day for the last few years when I use PowerShell, although redirection certainly is not something that has arisen with this environment.

Assuming that the redirection operator in Everything were the ">" character, the search to solve this situation could be expressed as:
folder: .git> child: .git
That sounds familar :) From time to time I wish I could use the results of query A as parameter of query B. Unix'es and Powershell solve this by using Query_B (query A) to reuse the output of queryA in queryB. In "Everything language" this would look something like: path:<querya> (<> is used for grouping in Everything).
But your idea of piping results (in Powershell: Query A |Query B ) is much cleaner. I don't know if it is possible, but I like it!
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: How to find GIT repository folders

Post by Stamimail »

But your idea of piping results (in Powershell: Query A |Query B ) is much cleaner. I don't know if it is possible, but I like it!
+1

In past I had discussed about the need to add a prefix before a function.
Syntax of functions

I've mentioned
/! for NOT to distinguish from literal "!".

I do not have much experience in programming/scripting, but according to NotNull, it will be:
/|
or
/SearchInResults:
i.e.

Code: Select all

folder: wfn:.git /| child:.git
folder: wfn:.git /SearchInResults: child:.git
bytejuggler
Posts: 1
Joined: Sat Aug 12, 2023 8:09 pm

Re: How to find GIT repository folders

Post by bytejuggler »

You can try like this:

Code: Select all

regex:folder:\\\.git$
Basically this searches for any folder ending in "\.git" by applying regex rules.

Alternatively you can do something like this, a search in 2 parts: 1) find ".\git" then exclude what isn't ending, e.g something like this:

Code: Select all

folder:\.git !folder:.git\ !folder:.github 
(The above 2 exclusions were all that was needed to leave only the .git folders in the result.)
Post Reply