Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Difftool VS Git Difftool --Dir-Diff Working Directories #2484

Closed
1 task done
Eddie-Hartman opened this issue Jan 20, 2020 · 4 comments
Closed
1 task done

Git Difftool VS Git Difftool --Dir-Diff Working Directories #2484

Eddie-Hartman opened this issue Jan 20, 2020 · 4 comments

Comments

@Eddie-Hartman
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

git version 2.25.0.windows.1 64 bit

$ git --version --build-options

** git version 2.25.0.windows.1
cpu: x86_64
built from commit: 7c71c859c97853ed057da5cbab12f3c13b5554df
sizeof-long: 4
sizeof-size_t: 8 **
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    10 64 bit
$ cmd.exe /c ver

** Microsoft Windows [Version 10.0.18362.592]
(c) 2019 Microsoft Corporation. All rights reserved. **
  • What options did you set as part of the installation? Or did you choose the
    defaults?
    Defaults except for using notepad++ and a few that are irrelevant to this issue
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

** Editor Option: Notepad++
Custom Editor Path: 
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
 **
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

** I'm using Meld as my difftool and mergetool. Version 3.18.3. I could not get 3.20.1 to install and run properly. **

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

** MINGW64 **

** git difftool
git difftool --dir-diff **
  • What did you expect to occur after running these commands?

** Git difftool will open the current branch on the left and the actual diff files on the right. This way I can modify files in Meld and save them to the actual location that git is running out of. **

  • What actually happened instead?

** When running git difftool, this works fine. When running git difftool --dir-diff, it puts everything into a temp directory and compares them out of there instead of the working directory. So after I modify files, saving in Meld will save to the temporary directory and the changes will be lost once closing Meld. Is it intentional that using --dir-diff even on the current directory copies to a temporary directory to compare? I'm not sure if this is something that has changed in an update or if it has always been this way.

Example of comparing a file with just difftool:
image

Example using difftool --dir-diff:
image

How would I got about using the --dir-diff command with my working directory?**

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

** Not a specific repo. **

@dscho
Copy link
Member

dscho commented Jan 20, 2020

How is this different from #1547?

@Eddie-Hartman
Copy link
Author

Based on your comments in that issue, it doesn't appear to be different.
I'm a bit surprised that difftool works fine when looking at the files sequentially, but --dir-diff has different behavior.

I did try searching before this, but there was A LOT to look through between looking through Meld's issue tracker and this one (and I wasn't looking for new files, oh well).

Any chance you know a way around this? Would like to be able to view differences in a directory structure to be able to bounce back and forth between files to view changes while modifying them.

@dscho
Copy link
Member

dscho commented Jan 20, 2020

Any chance you know a way around this?

I don't. But then, I do not quite understand all the details, I think: by default, the "right" side is populated with symlinks into the worktree, so if you edit any of those files, they should actually be modified in the worktree, not in the temporary directory.

@dscho
Copy link
Member

dscho commented Oct 31, 2021

Closing stale ticket.

@dscho dscho closed this as completed Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants