git@vger.kernel.org list mirror (unofficial, 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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git