Search code examples
windowsgitgit-bashmeld

git mergetool throws an error "mv: cannot move <file> to <file_backup_3056>: function not implemented


I'm trying to setup Meld as my difftool as this is something I've used for a few years now and what I'm comfortable with.

As usual, I setup my meld on my PATH and put

[merge]
    tool = meld
[diff]
    guitool = meld

in my global config.

Now, when I do git mergetool upon conflicts, I get this strange error:

enter image description here

And my meld is opening up like this: enter image description here

I've tried several variations of the difftool command like:

    [mergetool "meld"]
         cmd = meld.exe "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
         cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"

(one of those at a time) and, while local works, base and remote doesn't work. Executing git mergetool produces these files in my local dir:

enter image description here

Which is in line with the first error - cannot mv or cp to things... how do I fix this please?


Solution

  • These "function not implemented" errors indicate that you're working in a file system that does not support the normal POSIX semantics that Git relies on. It's not clear precisely why you are getting these errors. Sometimes Docker goes crazy, some people report various issues with WSL, some versions of SMB/Samba will sometimes do this, and so on. (I mention WSL specifically because of your and tags.)

    Once you're in this state, nothing in Git can fix it. If it's a Docker issue, restarting Docker may clear it up.

    If you're working in a cloud-synced folder, don't do that: work in a local folder. Git needs the POSIX semantics, especially within the .git repository proper, and cloud-synced systems don't respect this.