From: Brandon Williams Date: Wed, 02 Aug 2017 18:00:48 GMT Subject: Re: [PATCH v3 07/10] submodule: check for unstaged .gitmodules outside of config parsing Message-ID: <20170802180048.GD36159@google.com> In-Reply-To: <20170802174104.GB36159@google.com> On 08/02, Brandon Williams wrote: > On 07/31, Stefan Beller wrote: > > > > So this is where the check "pos < active_nr" is coming from, > > introduced in 5fee995244 (submodule.c: add .gitmodules staging > > helper functions, 2013-07-30) as well as d4e98b581b (Submodules: > > Don't parse .gitmodules when it contains, merge conflicts, 2011-05-14). > > > > If I am reading the docs for cache_name_pos correctly, we would > > not need to check for the index exceeding active_cache, > > but checking for the index not being out of bounds seems > > to be wide spread. > > I can drop the pos < active_nr requirement. From our conversation offline i'll leave this just in case there is some subtle reason why it exists. Also makes it more of a 1:1 conversion. -- Brandon Williams