1

I am using Beyond Compare 4 (beta) as the difftool in git on windows.

Here are the settings:

[diff]
    tool = bc4
[difftool]
    prompt = false
[difftool "bc4"]
    cmd = \"C:/Program Files (x86)/Beyond Compare 4/BComp.exe\" "$LOCAL" "$REMOTE"
[merge]
    tool = bc4
[mergetool]
    prompt = false
[mergetool "bc4"]
    #trustExitCode = true
    cmd = \"C:/Program Files (x86)/Beyond Compare 4/BComp.exe\" "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

I am using this command to diff the current local changes (including uncommitted/unstaged changes) with the starting point of the branch (where it diverged from the develop branch)

git difftool $(git merge-base develop HEAD) --dir-diff

This opens a directory diff with all the changed files. When I double-click a file it opens the file diff in a new tab.

I want to able to edit the "right side" file which is the current local version. The problem is that the actual file displayed is a temporary copy of the file that git created for Beyond Compare to display the diff (and will be deleted after I close the BC window).

However, when doing a single file diff, like this:

git difftool develop path/to/some/file.something

The "right side" of the diff displays the actual local version of the file, which can be edited.

Is there any way to tell git that when doing a dir-diff between something and the local version, to open the actual local files instead of creating a temporary copy?

My goal is to be able to edit and save the files from inside the BC dir-diff.

Malki
  • 2,335
  • 8
  • 31
  • 61
  • After some investigation I found the "git-difftool" file which is a perl script that launches the difftool. It is also responsible for creating the temporary files for the dir-diff. So I guess the only solution would be to edit this script to support what I want... – Malki Sep 02 '14 at 09:55
  • Found a better solution using the --symlinks parameter with git difftool http://git-scm.com/docs/git-difftool The problem now is that for some reason there are identical files that give different SHA1 values so the symlink is not created – Malki Sep 04 '14 at 10:41

0 Answers0