diffuse icon indicating copy to clipboard operation
diffuse copied to clipboard

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

Open nschaeff opened this issue 2 years ago • 1 comments

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

nschaeff avatar Jun 01 '23 18:06 nschaeff

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

Ansa211 avatar Jun 12 '23 13:06 Ansa211