[Bug] DiffviewFileHistory -S"term" matches as a regex, so literal searches silently return wrong results
In git, -S"term" matches the string literally. So :DiffviewFileHistory <path> -S"term" should match it literally too. Instead diffview+ adds --pickaxe-regex, so the string is matched as a pattern.
The effect is silent. -Sfoo.bar also matches fooXbar. -Sfoo(bar) is read as a group, not as text. The results are wrong, with no hint why.
The -G flag is unaffected, because git already treats it as a pattern. See git/init.lua#L798. The -S line adds the pattern flag: git/init.lua#L799.
Expected behavior
-S<term> matches the term literally, like git log -S<term>. Pattern matching should be opt-in, not forced.
Actual behavior
-S<term> always runs as -S<term> --pickaxe-regex. The term is matched as a pattern. Metacharacters are not matched literally. There is no way to request literal behavior.
Steps to reproduce
- In any repo, run
:DiffviewFileHistory <path> -Sfoo.bar - It also matches lines containing
fooXbar. - Native
git log -Sfoo.bar -- <path>matches only the literalfoo.bar.
Health check
Output of :checkhealth diffview
==============================================================================
diffview: ✅
Checking icon provider ~
- ✅ OK Icon provider found: nvim-web-devicons.
Checking VCS tools ~
- The plugin requires at least one of the supported VCS tools to be valid.
- ✅ OK Git is up-to-date. (2.55.0)
Log info
Relevant info from :DiffviewLog
[FileHistory] Updating with options: { flags = { "--follow", "-n256",
"--diff-merges=first-parent", "-Smenu", "--pickaxe-regex" },
path_args = { ".../Crossings.vue" } }
--pickaxe-regex is present even though only -Smenu was typed.
Neovim version
NVIM v0.13.0-dev-1418+gf97bcbdf77
Build type: RelWithDebInfo
LuaJIT 2.1.1787165859
diffview+ 3aba39f, git 2.55.0.
Operating system and version
Linux 6.18.52-1-cachyos-lts x86_64 GNU/Linux