diffuse
diffuse copied to clipboard
fails to show diffs with git when changed file is in a parent directory
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
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