## Description
I was using LazyGit feature to filter git logs by the author,
unfortunately it was missing in snacks picker. Here is my solution to
it. Let me know if you have better suggestion :)
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
## Description
<!-- Describe the big picture of your changes to communicate to the
maintainers
why we should accept this pull request. -->
This PR builds on
7122a03fdf
to provide a way to pass custom `args` to git command invocations.
An alternative (probably cleaner) way of doing this could be to add an
`args` field to `picker.sources.git`:
```yaml
picker = {
---@class snacks.picker.previewers.Config
previewers = {
git = {
args = git_opts(),
},
},
---@class snacks.picker.sources.Config
sources = {
git = {
args = git_opts(),
},
},
```
## Related Issue(s)
<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->
Fixes#1184
## Screenshots
<!-- Add screenshots of the changes if applicable. -->
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
## Description
When using the git log sources, what are your thoughts on preserving the
sort order when matching? I find most often when I use this picker I
want to see results in reverse chronological order. For example, I like
to use the picker to review the commit log to see new features added to
a repo.
## Screenshots
When matching for `feat` in the snacks repo with current behavior, the
output is less than useful:
<img width="868" alt="image"
src="https://github.com/user-attachments/assets/ed0fdf2a-ee1f-4325-8c87-85911837a757"
/>
But with the proposed change, it's much more relevant:
<img width="868" alt="image"
src="https://github.com/user-attachments/assets/7052b353-d38d-4573-bf72-b0d99c21672d"
/>
## Alternatives
I can override in my config:
```lua
picker = {
sources = {
git_log = { sort = { fields = { "score:desc", "idx" } } },
git_log_file = { sort = { fields = { "score:desc", "idx" } } },
git_log_line = { sort = { fields = { "score:desc", "idx" } } },
},
},
```