10000 Global search like in SourceTree · Issue #2357 · fork-dev/Tracker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Global search like in SourceTree #2357

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

Open
ctismer opened this issue May 22, 2025 · 9 comments
Open

Global search like in SourceTree #2357

ctismer opened this issue May 22, 2025 · 9 comments

Comments

@ctismer
Copy link
ctismer commented May 22, 2025

With Fork I am very happy with and would like to throw away SourceTree, but there is one feature that I'm missing: The ability to search a string in the whole repository, with a choice where to look into:

  • Commit Message
  • Commit SHA
  • Branch
  • File Changes
  • User

I am really using commit message and more often file changes.
Meanwhile I learnt how to do that with a git command, but I would like that in a Fork window very much.

@DanPristupov
Copy link
Contributor

Hi,

The search tab is on the sidebar:
Image

@ctismer
Copy link
Author
ctismer commented May 23, 2025

Hi Dan,

Interesting. Do you have a different version because I don't have the git icon.
Yes thanks I found the Search Commits now, but it does work differently from SourceView.

I have the current PySide6 repo open and search globally for a string
"ann = typing.Optional[ann]" which is found by SourceTree in an old commit
d4acbacd7a655e3ff9e17663a23ed0d822b84850
signature: Support typing.Optional[T] and refine a bit d4acbacd7 Christian Tismer tismer@stackless.com 29. Aug 2019 at 15:44

For some reason, Fork does not find this.
When I remove the "[ann]" part, it works. What is that?

Image

@DanPristupov
Copy link
Contributor
DanPristupov commented May 23, 2025

Interesting. Do you have a different version because I don't have the git icon.

Yes, I made this screenshot on Windows.

For some reason, Fork does not find this.

May be [ and ] must be escaped... Try to search ann = typing.Optional\[ann\]. Does it work?

@ctismer
Copy link
Author
ctismer commented May 23, 2025

Yes, searching for ann = typing.Optional\[ann\] works.
Searching for ann = typing.Optional\[.*\] works as well,
while ann = typing.Optional\[\w*\] does not work.
That suggests some regex syntax but a poor one.

Anyway, good enough, although I like it better without reges syntax as default.
Thanks a lot.

@DanPristupov
Copy link
Contributor

ann = typing.Optional\[\w*\] does not work.
That suggests some regex syntax but a poor one.

It's probably POSIX regex: https://git-scm.com/docs/git-log#Documentation/git-log.txt-code--pickaxe-regexcode, https://en.wikipedia.org/wiki/Regular_expression#Character_classes

  1. In Fork 2.53 we escaped [ and ]symbols in the search query.

@ctismer
Copy link
Author
ctismer commented May 24, 2025

Yes, I confirmed that searching now works with unescaped [] brackets. But one drawback of this is that escaping the brackets with backslash now stopped working. This is an incompatible change which would be worth mentioning explicitly in the change log.
Also it is even harder to explain Forks behavior now, because for [] brackets it now enforces no escapes starting with this version, but the rest still uses POSIX regex.
Evidance that we now have a "castrated regex":

  • ann = typing.Optional[ann] works
  • ann = typing.Optional\[ann\] nogo
  • ann = typing.Optional[an*n] works, correct match
  • ann = typing.Optional[an+n] works, correct match
  • ann = typing.Optional[an-n] nogo, a normal character

While I can live with it, the cleaner solution would be to have a switch for

  • plain test
  • regex
    but the regex syntax would need to have an e 8000 ntry with explicit syntax or a reference in help test.

Nevertheless, I am very satisfied with Fork and will use it exclusively from now on. Since I'm a full-time PySide developer, I'll be licensing the product starting in June. I'm very happy that you don't do this nonsense with subscriptions like GitKraken, because that was the reason to return to SourceTree.

Cheers and keep up the good work - Chris

@ctismer
Copy link
Author
ctismer commented May 24, 2025

The only annoying thing left is that I cannot send pull requests. I would like to contribute. Any chance?

@DanPristupov
Copy link
Contributor

Log in to your account in Fork (File -> Accounts -> +). Then right click on a branch and select 'Create Pull Request'

@ctismer
Copy link
Author
ctismer commented May 25, 2025

Sorry, I meant I would like to contribute pull requests to Fork 😄

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

No branches or pull requests

2 participants
0