# Bug report: Same path printed twice when comparing two directories outside repo

1 messages from 2020-08-15 to 2020-08-15. Participants: Lexis.
Thread: https://gitlist.dev/t/54052

## Lexis, 2020-08-15 10:36

Subject: Bug report: Same path printed twice when comparing two directories outside repo
Message-ID: <3f6ada7b-5de9-e69f-3b45-3b529862183e@runbox.com>
URL: https://gitlist.dev/e/3f6ada7b-5de9-e69f-3b45-3b529862183e%40runbox.com

```
# Bug report: Same path printed twice when comparing two directories
outside repo

## Repro steps

ˋˋˋsh
#!/bin/bash
cd $(mktemp -d)
mkdir dir0
mkdir dir1
touch dir1/test
git diff --no-index dir0 dir1
ˋˋˋ

## Expected output

diff --git a/dir0/test b/dir1/test

new file mode 100644

index 0000000..e69de29


## Actual output

diff --git a/dir1/test b/dir1/test

new file mode 100644

index 0000000..e69de29


## Difference between expected and actual output

The first output line shows the path to the compared file in the second
directory twice in the actual output. I expected it to print one path
for each directory.

[System Info]
git Version:
git version 2.28.0.297.g1956fa8f8d
cpu: x86_64
built from commit: 1956fa8f8d7168157346f0cbc0f1f9dd1fca787a
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.7.14-200.fc32.x86_64 #1 SMP Fri Aug 7 23:16:37 UTC 2020
x86_64
Compiler Info: gnuc: 10.2
libc Info: glibc: 2.31
$SHELL (typically, interactive shell): /usr/bin/zsh

```
