On 2024-01-19 at 13:25:51, Frank Schwidom wrote: > > This bug exists in possibly all git versions. > > $ git init > $ touch a.txt > $ ln -s a.txt d > $ git add . > $ git commit -m + . > [master (root-commit) f6b4468] + > 2 files changed, 1 insertion(+) > create mode 100644 a.txt > create mode 120000 d > $ ls -la > total 12 > drwxr-xr-x 3 ox ox 4096 Jan 19 14:10 . > drwxr-xr-x 4 ox ox 4096 Jan 19 14:04 .. > drwxr-xr-x 8 ox ox 4096 Jan 19 14:10 .git > -rw-r--r-- 1 ox ox 0 Jan 19 14:10 a.txt > lrwxrwxrwx 1 ox ox 5 Jan 19 14:10 d -> a.txt > $ rm d > $ mkdir d > $ touch d/b.txt > $ git add . > $ git commit . -m + > error: 'd' does not have a commit checked out > fatal: updating files failed I can confirm this behaviour[0], and it's definitely wrong that it thinks `d` is a submodule. It does, however, work if you do `git commit -m +` (that is, without the .), which makes sense since the relevant change is already staged in the index. I'm not going to get to a patch or more thorough investigation, but perhaps someone else will. [0] git version 2.43.0.381.gb435a96ce8 -- brian m. carlson (he/him or they/them) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature