From: Thomas Gummerer Date: Wed, 27 Feb 2019 22:45:53 GMT Subject: Re: [WIP RFC PATCH v2 4/5] clone: extract function from copy_or_link_directory Message-ID: <20190227224553.GS6085@hank.intra.tgummerer.com> In-Reply-To: On 02/27, Matheus Tavares Bernardino wrote: > On Tue, Feb 26, 2019 at 9:18 AM Duy Nguyen wrote: > > > > On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares > > wrote: > > > + */ > > > + struct stat st; > > > + > > > + if (mkdir(pathname, mode)) { > > > > Good opportunity to unindent this by doing > > > > if (!mkdir(... > > return; > > > > but it's up to you. > > > > Ok. But being such a small snippet, is the indentation really a code > smell here? (sorry, I'm still getting used to git's coding guidelines) I don't think the indentation here is too bad here, but I think the code is slightly easier to read with less indentation, and it's easier to see what's happening in the success case as well without reading the whole method. And since this patch is already refactoring code we could do it here. I don't think it's a very big deal either way, which is why Duy left the decision on whether to use the suggestion or not up to you.