From: Junio C Hamano Date: Thu, 25 Aug 2016 22:38:50 GMT Subject: Re: [PATCH v10 0/9] submodule inline diff format Message-ID: In-Reply-To: Jacob Keller writes: > So we should support the gitlink to a repository stored at > without stuff inside the .git/modules, and we should support submodule > gitlinks with a proper .gitmodules setup. I don't think we should > die() but we should error properly so I will introduce a _gently() > variant of these functions, and die properly in the regular flow. Because "git diff [--cached] []" in the top-level is driven by a gitlink in the index, immediately after adding a new submodule to the index but before describing it in .gitmodules you might not have a name (and you know in that case the path will become the name when adding it to .gitmodules). Also a gitlink in the index may correspond to a submodule the user of the top-level is not interested in, so there may not be anything in .git/modules/ that corresponds to it. In these cases, I suspect that you do not want to die, but you can just tell the user "I do not have enough information to tell you a useful story yet".