tibirna / qgit

Official git repository for QGit.
Other
174 stars 68 forks source link

Added diff against existing file instead of doing a diff on copy. #3

Closed balbusm closed 6 years ago

balbusm commented 7 years ago

This PR adds diff against real file in case of comparing against current working directory. Feature is described on SourceForge: https://sourceforge.net/p/qgit/feature-requests/16/ Could you pull this change into base code?

tibirna commented 7 years ago

I'm a bit unsure about this. The sourceforge thread speaks about changing the HEAD revision (which is still wrong and technically requiring a new commit).

Even changing the current real file when comparing with the working directory is, IMO, a not so good idea. Those file-editing diff tools are more or less (often less) good at distinguishing between real files and revisions. Some users can get confused.

What qgit should better do is (while keeping the current tempfile technique) detect when these tempfiles got changed and notify the user that changes would be lost (or offer to save modified tempfile under user provided new name).

Anwyays, I'll look at the PR.

Thanks!