{"thread":{"id":"54052","subject":"Bug report: Same path printed twice when comparing two directories outside repo","startedAt":"2020-08-15T23:29:35Z","lastAt":"2020-08-15T23:29:35Z","messageCount":1,"participants":["Lexis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"403781","messageId":"3f6ada7b-5de9-e69f-3b45-3b529862183e@runbox.com","threadId":"54052","inReplyTo":null,"subject":"Bug report: Same path printed twice when comparing two directories outside repo","fromName":"Lexis","fromEmail":"zuiqxejp@runbox.com","sentAt":"2020-08-15T10:36:47Z","receivedAt":"2020-08-15T23:29:35Z","isPatch":false,"sender":{"key":"zuiqxejp@runbox.com","avatar":null},"body":"# Bug report: Same path printed twice when comparing two directories\noutside repo\n\n## Repro steps\n\n```sh\n#!/bin/bash\ncd $(mktemp -d)\nmkdir dir0\nmkdir dir1\ntouch dir1/test\ngit diff --no-index dir0 dir1\n```\n\n## Expected output\n\ndiff --git a/dir0/test b/dir1/test\n\nnew file mode 100644\n\nindex 0000000..e69de29\n\n\n## Actual output\n\ndiff --git a/dir1/test b/dir1/test\n\nnew file mode 100644\n\nindex 0000000..e69de29\n\n\n## Difference between expected and actual output\n\nThe first output line shows the path to the compared file in the second\ndirectory twice in the actual output. I expected it to print one path\nfor each directory.\n\n[System Info]\ngit Version:\ngit version 2.28.0.297.g1956fa8f8d\ncpu: x86_64\nbuilt from commit: 1956fa8f8d7168157346f0cbc0f1f9dd1fca787a\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.7.14-200.fc32.x86_64 #1 SMP Fri Aug 7 23:16:37 UTC 2020\nx86_64\nCompiler Info: gnuc: 10.2\nlibc Info: glibc: 2.31\n$SHELL (typically, interactive shell): /usr/bin/zsh\n"}]}