From: Jonathan Tan Date: Thu, 12 Nov 2020 20:39:04 GMT Subject: Re: [PATCH v2 13/20] merge-ort: step 1 of tree writing -- record basenames, modes, and oids Message-ID: <20201112203904.3443874-1-jonathantanmy@google.com> In-Reply-To: > On Wed, Nov 11, 2020 at 12:01 PM Jonathan Tan wrote: > > > > > +struct directory_versions { > > > + struct string_list versions; > > > > Maybe comment that this is an unordered list of basenames to > the type of ci->merged.result is>. > > There actually is an order, and it's important. It's reverse > lexicographic order of full pathnames (the ordering comes from the > fact that process_entries() iterates paths in that order). The > reasons for that ordering are (1) all the basenames within a directory > are adjacent so that I can write out a tree for a directory as soon as > it is done, and (2) paths within a directory are listed before the > directory itself so that I get the necessary info for subtrees before > trying to write out their parent trees. > > It's not until later patches that I take advantage of this ordering > (and when I do I have a very long commit message to describe it all), > but I can add a comment that this is a list of basenames to > merge_info. Ah, yes you're right. I'm not sure what I was thinking of.