git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Possible bug with checkout and submodules

From
AHAdam Hutchings <adam.abahot@gmail.com>
Date
Oct 16, 2021, 18:44 UTC
Message-ID
<CADTYju0PpHHG1=S3N4MDWk5yZqb5t_KUhiDvZ_2i-vXFUT_LDw@mail.gmail.com>
Hi,
I may have found a bug in Git but I'm not sure if it's intentional or not. I
checked out to a new branch to test a PR on my repo, and the PR added a
submodule. I init'ed and updated the submodule, and when I was done testing, I
went back to my main branch. However, it did not remove the submodule, and
produced this message:
```
$ git checkout main
warning: unable to rmdir 'glfw': Directory not empty
Switched to branch 'main'
$
```
A friend of mine has managed to reproduce this behavior. We believe the expected
outcome is to remove the submodule folder, but this does not seem to happen. Is
this intentional?
Best,
Adam Hutchings
Next: brian m. carlson
Message 1 of 4 in “Possible bug with checkout and submodules”
  1. Adam HutchingsOct 16, 2021
  2. brian m. carlsonOct 16, 2021
  3. Adam HutchingsOct 16, 2021
  4. Philippe BlainOct 17, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.