git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git apply fails on case-only rename on case-insensitive filesystem
@ 2022-06-08 13:07 Tao Klerks
  2022-06-08 22:27 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Tao Klerks @ 2022-06-08 13:07 UTC (permalink / raw)
  To: git

Hi folks,

I just found out that "git apply" has a faulty existence check on
case-insensitive filesystems (or, at least, windows?).

Simplest repro I could come up with:

git init renamefun
cd renamefun
echo "Test" > file1
git add .
git commit -m "first commit"
git mv file1 File1
git commit -m "second commit"
git checkout master~1
git diff master~1..master | git apply

-> error:
error: File1: already exists in working directory

(on linux, the same sequence of commands completes correctly)

I was able to work around this for my purposes by avoiding rename
detection on the diff, and only passing the "Add" (and "Modify")
operations through to the "apply", after having separately/manually
handled the deletions.

Is this a known issue that someone might be working on, or worth
digging into / trying to fix?

Thanks,
Tao

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-09  4:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 13:07 Git apply fails on case-only rename on case-insensitive filesystem Tao Klerks
2022-06-08 22:27 ` brian m. carlson
2022-06-09  4:57   ` Tao Klerks

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).