vscode-git-tree-compare icon indicating copy to clipboard operation
vscode-git-tree-compare copied to clipboard

Merge diff shows locally changed files

Open pmahend1 opened this issue 1 year ago • 4 comments

Local uncommitted and/or unstaged files also show up in Git Tree Compare in Merge Diff mode . I looked if there is any setting which would change it, there isn't. I tried toggling gitTreeCompare.diffMode but it doesn't change it.

pmahend1 avatar Feb 01 '24 15:02 pmahend1

That's by design. Are you asking for a new feature to disable this?

letmaik avatar Feb 01 '24 20:02 letmaik

If it is possible to implement it without having to stash changes that would be great. If not possible feel free to close this request.

pmahend1 avatar Feb 02 '24 04:02 pmahend1

Omitting uncommitted (untracked) files would be easy, this just means not running git ls-files -z --others --exclude-standard. Ignoring unstaged changes would mean adding the --cached flag to the main diff command git diff-index -z --find-renames. Both fairly easy to do, the rest of the work would just be exposing it optionally under some config option. Do you want to have a go at it?

letmaik avatar Feb 07 '24 23:02 letmaik

I will give it try, will let you know if I need help.

pmahend1 avatar Feb 08 '24 17:02 pmahend1