Hi, i tried to run "git submodule deinit xxx" on a submodule that was recently removed from the Rust project. But git responded with a BUG/Core dump (and also did not remove the submodule directory from the checkout). ~/src/rust/rust$ git submodule deinit src/rt/hoedown/ error: pathspec 'src/rt/hoedown/' did not match any file(s) known to git. BUG: builtin/submodule--helper.c:1045: module_list_compute should not choke on empty pathspec Aborted (core dumped) I had a short look at submodule--helper.c and module_list_compute() is called from multiple places. Most of them handle failure by return 1; Only module_deinit() seems to calls BUG() on failure. This leaves me with 2 questions: 1) Should this code path just ignore the error and also return 1 like other code paths? 2) Should "git submodule deinit" work on submodules that were removed by upstream already? For more debugging information please see below. Thanks, Greetings Peter ~/src/rust/rust$ git --version git version 2.17.0.rc1.47.g9f57127417.dirty (this should basically be 90bbd502d54fe920356fa9278055dc9c9bfe9a56 + some Makefile adjustments) Git Gui reports src/rt/hoedown Untracked, not staged * Git Repository (subproject) ~/src/rust/rust$ git status On branch fix_literal_attribute_doc Untracked files: (use "git add <file>..." to include in what will be committed) src/rt/ ~/src/rust/rust$ cat .git/config ... [submodule "src/rt/hoedown"] url = https://github.com/rust-lang/hoedown.git ... -> there is no "active = true" in this hoedown section which is present on some (not all) other submodules ~/src/rust/rust$ cat .gitmodules -> does not contain any references to hoedown anymore as they were remove by upstream ~/src/rust/rust$ cat src/rt/hoedown/.git gitdir: ../../../.git/modules/src/rt/hoedown ~/src/rust/rust/src/rt/hoedown$ git status HEAD detached at da282f1 nothing to commit, working tree clean -> so there is a working git repository at src/rt/hoedown ~/src/rust/rust$ git submodule status 9b2dcac06c3e23235f8997b3c5f2325a6d3382df src/dlmalloc (heads/master) b889e1e30c5e9953834aa9fa6c982bb28df46ac9 src/doc/book (remotes/origin/ch10-edits-137-gb889e1e3) 6a8f0a27e9a58c55c89d07bc43a176fdae5e051c src/doc/nomicon (remotes/origin/HEAD) 76296346e97c3702974d3398fdb94af9e10111a2 src/doc/reference (remotes/origin/HEAD) d5ec87eabe5733cc2348c7dada89fc67c086f391 src/doc/rust-by-example (remotes/origin/HEAD) 1f5a28755e301ac581e2048011e4e0ff3da482ef src/jemalloc (3.6.0-775-g1f5a2875) 263a703b10351d8930e48045b4fd09768991b867 src/libcompiler_builtins (remotes/origin/auto-10-g263a703) ed04152aacf5b4798f78ff13396f3c04c0a77144 src/liblibc (0.2.37-29-ged04152aac) 6ceaaa4b0176a200e4bbd347d6a991ab6c776ede src/llvm (remotes/origin/rust-llvm-release-6-0-0) -2717444753318e461e0c3b30dacd03ffbac96903 src/llvm-emscripten bcb720e55861c38db47f2ebdf26b7198338cb39d src/stdsimd ((null)) 311a5eda6f90d660bb23e97c8ee77090519b9eda src/tools/cargo (0.14.0-2144-g311a5eda) eafd09010815da43302ac947afee45b0f5219e6b src/tools/clippy (v0.0.189-21-geafd0901) b87873eaceb75cf9342d5273f01ba2c020f61ca8 src/tools/lld ((null)) d4712ca37500f26bbcbf97edcb27820717f769f7 src/tools/miri (remotes/origin/hack_branch_for_miri_do_not_delete_until_merged) f5a0c91a39368395b1c1ad322e04be7b6074bc65 src/tools/rls (0.125-131-gf5a0c91) 118e078c5badd520d18b92813fd88789c8d341ab src/tools/rust-installer (remotes/origin/HEAD) 374dba833e22cc8df8e16e19cccbde61c69d9aed src/tools/rustfmt (0.4.1-35-g374dba83) -> strangely I get (null) for the current branch/commit in some submodules?