git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug report: Same path printed twice when comparing two directories outside repo
@ 2020-08-15 10:36 Lexis
  0 siblings, 0 replies; only message in thread
From: Lexis @ 2020-08-15 10:36 UTC (permalink / raw)
  To: git

# 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-15 23:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-15 10:36 Bug report: Same path printed twice when comparing two directories outside repo Lexis

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).