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

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

Open
nschaeff opened this issue Jun 1, 2023 · 1 comment
Open

Comments

@nschaeff
Copy link

nschaeff commented Jun 1, 2023

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
Copy link

Ansa211 commented Jun 12, 2023

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

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