Petr Baudis <pasky@xxxxxxx> writes: >> >> +{ >> >> + char *key = submodule_by_path(name); >> >> + char *sectend = strrchr(key, '.'); >> >> + >> >> + assert(sectend); >> >> + *sectend = 0; >> > >> > Here is one caller I questioned in my comments on [1/6]... >> >> Another thing --- can submodule_by_path() ever return NULL saying "I do >> not see one in the configuration"? > > No, it would rather die(). Hmmmm. If I did... $ git init $ create and add normal paths $ git clone git://..../gitk.git gitk $ git add gitk : heh, I changed my mind $ git rm gitk the last step would die, because I changed my mind before fully initializing gitk repository as a proper submodule? How would I get rid of the index entry to recover from the mistake? $ rm -fr gitk $ git rm gitk would presumably fail the same way, no? I hope I am misreading the code... We need to be extremely careful not to break people who do not (yet) have [submodule "xyzzy"] entries in config and/or .gitmodules when dealing with the gitlink entries in the index. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html