What did you do before the bug happened? (Steps to reproduce your issue) I created a simple external diff program called `mydiff` and added it to $PATH with exe permissions. It looks like this: #!/bin/bash # So that I can see how git calls me echo $0 ${1+"$@"} # || true is just so that git doesn't think that the external diff failed diff -u $2 $5 || true Next, I created a new repository with one file in a sub-directory. I put five paragraphs of generated lorem ipsum in the file. Here are the precise commands I ran to do this: $ mkdir lorem-ipsum $ cd lorem-ipsum $ git init $ mkdir subdir $ : Add some text to this file ... (I added the five paragraphs here) $ paste > subdir/text $ git add subdir/text $ git commit -m "initial commit" $ : Make a minor change to the file $ vim subdir/text $ : With the local modification in place, the following looks correct $ git diff --relative $ : This also looks correct $ GIT_EXTERNAL_DIFF=mydiff git diff --relative $ : However, cd to the sub-directory and try it again... $ cd subdir $ : The following looks as if the file was deleted $ GIT_EXTERNAL_DIFF=mydiff git diff --relative $ : However, this still looks correct $ git diff --relative What did you expect to happen? (Expected behavior) When using a diff.external command with --relative, the diff output should show the minor change that I made to the file. What happened instead? (Actual behavior) The diff output shows the entire old contents of the file as deleted. The header of the patch looked like this (indent added for this report): --- /private/tmp/git-blob-DQP9aO/text 2023-01-04 14:33:00.000000000 -0700 +++ /dev/null 2023-01-04 14:33:00.000000000 -0700 Here are the arguments that git passed to mydiff: /<path>/<to>/bin/mydiff text /private/tmp/git-blob-KTGAg0/text 0515a69f4ce73e295f4a7824f475bf75793cadb9 100644 /dev/null . . What's different between what you expected and what actually happened? Git failed to pass the new contents of the file as the fifth argument to the external diff command which led to showing that the file had apparently been deleted when it had not. The sixth and seventh arguments aren't correct either but mydiff doesn't use them. Anything else you want to add: The following three things ALL appear to be necessary to reprouduce this behavior: 1. Setting an external diff program (either with env var or through .gitconfig) 2. Using --relative (either on the command line or using .gitconfig) 3. Running `git diff` from a sub-directory under the root of the repository. Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.39.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64 compiler info: clang: 14.0.0 (clang-1400.0.29.202) libc info: no libc information available $SHELL (typically, interactive shell): /bin/zsh [Enabled Hooks]