Re: [WIP RFC PATCH v2 4/5] clone: extract function from copy_or_link_directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 27, 2019 at 7:45 PM Thomas Gummerer <t.gummerer@xxxxxxxxx> wrote:
>
> On 02/27, Matheus Tavares Bernardino wrote:
> > On Tue, Feb 26, 2019 at 9:18 AM Duy Nguyen <pclouds@xxxxxxxxx> wrote:
> > >
> > > On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares
> > > <matheus.bernardino@xxxxxx> 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.

Ok, so I will do it for the next version! I just asked because it was
a good chance for me to learn a bit more about git's code style :)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux