From: Lexis <zuiqxejp@runbox.com>
To: git@vger.kernel.org
Subject: Bug report: Same path printed twice when comparing two directories outside repo
Date: Sat, 15 Aug 2020 12:36:47 +0200 [thread overview]
Message-ID: <3f6ada7b-5de9-e69f-3b45-3b529862183e@runbox.com> (raw)
# 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
reply other threads:[~2020-08-15 23:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f6ada7b-5de9-e69f-3b45-3b529862183e@runbox.com \
--to=zuiqxejp@runbox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).