On Thu, Aug 25, 2016 at 1:46 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote: > On Thu, Aug 25, 2016 at 1:39 PM, Jacob Keller <jacob.keller@xxxxxxxxx> wrote: >> On Tue, Aug 23, 2016 at 10:47 AM, Stefan Beller <sbeller@xxxxxxxxxx> wrote: >>> On Tue, Aug 23, 2016 at 10:25 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: >>>> I am not so sure about that. If there is an existing place that is >>>> buggy, shouldn't we fix that, instead of spreading the same bug >>>> (assuming that it is a bug in the first place, which I do not have a >>>> strong opinion on, at least not yet)? >>>> >>>> Can there be .git/modules/<foo>/ repository that is pointed at an >>>> in-tree .git file when there is no "name" defined? >>> >>> If you're holding it wrong we can come into that state. >>> * Checkout the submodule, >>> * then remove .gitmodules as well as relevant config in .git/config. >>> Result: Then we have a only a gitlink recorded as well as connected >>> working tree to a gitdir inside a superprojects .git/modules/. >>> >> >> Yea, but I think you're right that we shouldn't support that state. >> What I'm worried about is the case where we can get this state doing >> something sane/acceptable but I don't think we can. >> >> So we should support the gitlink to a repository stored at <path> >> 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. > > ok, thanks! Ok so a die() doesn't really work. If you use submodule_from_path here on a newly checked out repository that has sub modules but you haven't yet initialized the repository, then the result is that submodule_from_path will fail.. Is that expected? That causes us to die every time on a newly checked out repository. If we go with this behavior, then I have to refactor the whole set of path() functions to have a _gently() variant which handles this gracefully, and the regular revision code would still end up die()ing as well...... Thanks, Jake -- 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