Am 18.10.18 um 20:49 schrieb Stefan Beller:
> On Thu, Oct 18, 2018 at 11:38 AM Johannes Sixt <[email protected]> wrote:
>
>> There is one peculiarity, though: [...]
>
> The explanation makes sense, and the code looks good.
> Do we want to have a test for this niche case?
>
Good point. That would be the following. But give me a day or two to
cross-check on Windows and whether it really catches the breakage.
diff --git a/t/t4053-diff-no-index.sh b/t/t4053-diff-no-index.sh
index 453e6c35eb..6e0dd6f9e5 100755
--- a/t/t4053-diff-no-index.sh
+++ b/t/t4053-diff-no-index.sh
@@ -127,4 +127,14 @@ test_expect_success 'diff --no-index from repo subdir
respects config (implicit)
test_cmp expect actual.head
'
+test_expect_success 'diff --no-index from repo subdir with absolute paths' '
+ cat <<-EOF >expect &&
+ 1 1 $(pwd)/non/git/{a => b}
+ EOF
+ test_expect_code 1 \
+ git -C repo/sub diff --numstat \
+ "$(pwd)/non/git/a" "$(pwd)/non/git/b" >actual &&
+ test_cmp expect actual
+'
+
test_done