git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: git@vger.kernel.org
Cc: Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Regression in git diff with stdin, with -R
Date: Sat, 9 Sep 2023 23:42:41 +0300 (EEST)	[thread overview]
Message-ID: <d42579a0-f438-9b4c-97e4-58724dbe4a4@martin.st> (raw)

Hi,

Since 1e3f26542a6ecd3006c2c0d5ccc0bae4a700f7e5, "diff --no-index: support 
reading from named pipes", one usecase about diffing with stdin has 
broken.

I see that this patch was preceded by adding some extra tests around 
diffing with stdin - but one case seem to have been missed.

"git diff --no-index - regularfile" still works fine as it did before, 
also "git diff --no-index regularfile -" also still works. (I.e. stdin can 
either be the first or second file argument - both work.)

However if using the -R option to reverse the diff direction, i.e. "git 
diff --no-index -R - regularfile" or "git diff --no-index -R regularfile 
-", I'm now getting the following error:

     fatal: stat '-': No such file or directory

// Martin


             reply	other threads:[~2023-09-09 20:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09 20:42 Martin Storsjö [this message]
2023-09-09 22:12 ` [PATCH] diff --no-index: fix -R with stdin René Scharfe
2023-09-10 10:00   ` Phillip Wood
2023-09-10 18:41   ` Taylor Blau
2023-09-11 19:04   ` Junio C Hamano
2023-09-11 19:20   ` Martin Storsjö

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d42579a0-f438-9b4c-97e4-58724dbe4a4@martin.st \
    --to=martin@martin.st \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    /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.
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 NNTP newsgroup(s).