From: Derrick Stolee Date: Wed, 11 Nov 2020 15:31:44 GMT Subject: Re: [PATCH v2 10/20] merge-ort: avoid recursing into identical trees Message-ID: <88ff65b6-1529-3471-00c3-c91233d75ad9@gmail.com> In-Reply-To: <20201102204344.342633-11-newren@gmail.com> On 11/2/2020 3:43 PM, Elijah Newren wrote: > + /* > + * If mbase, side1, and side2 all match, we can resolve early. Even > + * if these are trees, there will be no renames or anything > + * underneath. > + */ > + if (side1_matches_mbase && side2_matches_mbase) { Here is a case where if you were not caring about renames you could prevent recursion here when "!renames && sides_match". Something to think about. > + /* mbase, side1, & side2 all match; use mbase as resolution */ > + setup_path_info(opt, &pi, dirname, info->pathlen, fullpath, > + names, names+0, mbase_null, 0, > + filemask, dirmask, 1); > + return mask; > + } > + -Stolee