MightyCreak / diffuse

Diffuse is a graphical tool for comparing and merging text files. It can retrieve files for comparison from Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion, and SVK repositories.
http://mightycreak.github.io/diffuse/
GNU General Public License v2.0
258 stars 45 forks source link

fails to show diffs with git when changed file is in a parent directory #211

Open nschaeff opened 1 year ago

nschaeff commented 1 year ago

For instance, within the diffuse main git directory:

diffuse -c 613381    # shows the modified file as expected, which is in the current working dir
cd src
diffuse -c 613381    # FAILS to show the modified file, which is in the parent dir
Ansa211 commented 1 year ago

I've learnt to think of this as a feature rather than a bug: only files in the current subdirectory are shown, so if I change a lot of files and only want to see changes in a subset, it's easy. If you like, you could write a wrapper along the lines of

cd $(git rev-parse --show-cdup)
diffuse "$@"
cd -

DISCLAIMER: I haven't tested the suggested code. Also see: https://stackoverflow.com/questions/1571461/git-a-quick-command-to-go-to-root-of-the-working-tree