maks / MGit

A Git client for Android.
https://manichord.com/projects/mgit.html
GNU General Public License v3.0
1.26k stars 167 forks source link

Git grep #684

Open stephanritscher opened 1 year ago

stephanritscher commented 1 year ago

Hi,

especially when cloning repos of other authors, one of my main interest is to find my wy around. This involves good searching and navigation capabilities.

Git provides a great feature for this, the git grep subcommand. I would like to be able to use this within mgit with as little typing as possible, i.e. only typing a pattern should be required while other options should be presented as separate GUI elements. The search results should be navigatable, i.e. "clicking on" a line should navigate to the file and position of the respective match. Bbasic git grep switches like -i, -v, -E/-G/-F/-p should be sufficient for starters, others might be added later, while output format control might be due to application logic.

Github itself shows an alternative approach which tries to be more user friendly but IMHO isn't. While filter options by file type ("language") are nice to have, it doesn't really support regexes afaik which reduces powerfulness of the feature a lot (I mean, hey, we all know what we do, don't we).

Did you or will you consider adding a code search feature?

Best regards, Stephan