Re: [PATCH 02/15] submodule: don't use submodule_from_name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 30, 2017, 21:25 UTC
- Message-ID
- <xmqqefsxk469.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <a3650c9a-fa42-09e6-efcd-f912d5ffc042@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 9 quoted lines
>> I wonder if we should barf loudly if there shouldn't be a submodule
>> at that path, i.e.
>>
>> if (!submodule)
>> die("there is no submodule defined for path '%s'"...);
>>
>> though.
>
> Not sure if you want to die() or just issue a warning(), but yes.As long as the code after that point is prepared to see a NULL submodule and still behaves sensibly, then I would of course prefer not dying. Continuing with just a warning() may not be a safe thing to do if we are not prepared to see a NULL submodule after that point, though.