From: Teng Long Date: Fri, 14 Jan 2022 07:59:01 GMT Subject: Re: [PATCH v10 5/9] ls-tree: optimize naming and handling of "return" in show_tree() Message-ID: In-Reply-To: <220113.861r1cxgxx.gmgdl@evledraar.gmail.com> On Thu, Jan 13, 2022 at 2:55 PM Ævar Arnfjörð Bjarmason wrote: > Re the $subject: Is "optimize naming" here just referring to the > s/retval/recurse/g? Yes. > Personally I think just a s/retval/ret/g here would make more senes if > we're doing any change at all, and in either case having this variable > re-rename split up as its own commit would make the proposed control > flow changes clearer. Do you mean that I can split the current one into two commits, one does the renaming work and another one does the left work? If so, I will do this in the next patch. > > This new function is a re-invention of the object_type() utility in > cache.h, and isn't needed. I.e.... > > ...just drop it and do this: > > - enum object_type type = get_type(mode); > + enum object_type type = object_type(mode); You are absolutely correct. I will replace get_type() to object_type() in the next patch.