You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Untracked files are not displayed when using DiffviewOpen to compare the working tree against a specific commit (e.g., DiffviewOpen HEAD~2), even though the documentation indicates this should show all working tree changes.
Note
I noticed the code has an explicit check to only show untracked files for STAGE..LOCAL comparisons, so this might be intentional behavior. However, it seems inconsistent with the documentation which states "Diff the working tree against a specific commit". If this is by design, I apologize for the confusion, but I wanted to raise this as the current behavior was unexpected.
Expected behavior
When running :DiffviewOpen HEAD~2, untracked files should be visible in the file panel since we're comparing the working tree (which includes untracked files) against a specific commit.
Actual behavior
Untracked files are not displayed when using DiffviewOpen with any commit reference. They only appear when running DiffviewOpen without arguments (comparing index vs working tree).
Steps to reproduce
Create an untracked file: echo "test" > untracked.txt
Run :DiffviewOpen HEAD~1 (or any commit reference)
Observe that untracked.txt is not shown in the file panel
Description
Untracked files are not displayed when using
DiffviewOpento compare the working tree against a specific commit (e.g.,DiffviewOpen HEAD~2), even though the documentation indicates this should show all working tree changes.Note
I noticed the code has an explicit check to only show untracked files for
STAGE..LOCALcomparisons, so this might be intentional behavior. However, it seems inconsistent with the documentation which states "Diff the working tree against a specific commit". If this is by design, I apologize for the confusion, but I wanted to raise this as the current behavior was unexpected.Expected behavior
When running
:DiffviewOpen HEAD~2, untracked files should be visible in the file panel since we're comparing the working tree (which includes untracked files) against a specific commit.Actual behavior
Untracked files are not displayed when using
DiffviewOpenwith any commit reference. They only appear when runningDiffviewOpenwithout arguments (comparing index vs working tree).Steps to reproduce
echo "test" > untracked.txt:DiffviewOpen HEAD~1(or any commit reference)untracked.txtis not shown in the file panel:DiffviewOpenwithout argumentsuntracked.txtis now visibleHealth check
==============================================================================⚠️
diffview: 1
Checking plugin dependencies ~
Checking VCS tools ~
hg_cmdis not executable: 'hg'Log info
No response
Neovim version
Operating system and version
macOS v15.5
Minimal config