VimDiff E93: More than one match for RE
Asked Answered
D

1

16

So I am new to using vimdiff, however I feel like there is some error. Whenever I try to choose the changes from the remote repository with the command:

:diffg RE

I get the error:

E93: More than one match for RE

Not sure where this is coming from or how to solve it. I was pretty surprised that stack overflow doesn't seem to have this problem posted anywhere. Thanks in advance to anyone who can help :)

Drogin answered 25/7, 2018 at 13:54 Comment(0)
K
19

There's probably one of the file paths that match the string "RE". Try :diffget REMOTE and it should be okay.

Kowtow answered 25/7, 2018 at 16:56 Comment(2)
If it really checks the file paths, that seems like a bug? because it's which ref we want. If someone had remote in the file path. what would you do?Rashad
@christopherclark I didn't actually know, my answer was a hunch so I've dug deeper. See :help diffget in vim. The diffget command expects a bufspec which is either a numbered buffer (from :ls) or it will attempt to fuzzy match a unique path from available buffers. In the case you raise (and all others) you need to specify a buffspec that uniquely identifies a buffer. Note that REMOTE isn't a vim thing, git names a temporary file this way when setting up a three way merge with git merge-tool.Kowtow

© 2022 - 2024 — McMap. All rights reserved.