Open
Description
Consider the following on a case-insensitive filesystem:
git init
echo a >a
git add a
git commit -m 'a'
git checkout --orphan=b
git mv a A
echo A >A
git add A
git commit -m 'A'
git merge --allow-unrelated-histories master
# this will show up as one of the files changed
git diff
git status
In the above, Git simply reports that one of the two files has changed, but perhaps we could do something like this:
$ git status
On branch b
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: A (filename collides with 'a')
no changes added to commit (use "git add" and/or "git commit -a")
and
$ git diff
file 'A' collides with 'a'
diff --git a/A b/A
index f70f10e..7898192 100644
--- a/A
+++ b/A
@@ -1 +1 @@
-A
+a
or something like that? Either way, we shouldn't be blindly ignoring the fact that a collision has happened but we should warn users explicitly so that they're aware.
Metadata
Metadata
Assignees
Labels
No labels