Re: [PATCH v4 1/6] pretty.c: delimit "%(trailers)" arguments with ","

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

 



On Mon, Oct 02, 2017 at 09:11:50AM +0900, Junio C Hamano wrote:

> > diff --git a/pretty.c b/pretty.c
> > index 94eab5c89..eec128bc1 100644
> > --- a/pretty.c
> > +++ b/pretty.c
> > @@ -1056,6 +1056,25 @@ static size_t parse_padding_placeholder(struct strbuf *sb,
> >  	return 0;
> >  }
> >  
> > +static int match_placeholder_arg(const char *to_parse,
> > +				const char *candidate,
> > +				const char **end)
> 
> "make style" wants to format this like so:
> 
> static int match_placeholder_arg(const char *to_parse, const char *candidate,
> 				 const char **end)
> 
> I think I can live with either versions ;-)

I can live with either, too, though I do prefer the 3-line form (which
is unsurprising since it comes from what I wrote in an earlier thread).
I don't think it conveys a huge amount of meaning here, but there are
definitely times when I would tweak the wrapping of long argument lists
to convey meaning. E.g.:

  void some_function(struct foo *foo,
                     const char *buf, size_t len,
		     unsigned flags);

rather than

  void some_function(struct foo *foo, const char *buf,
                     size_t len, unsigned flags);

It's a little sad to be beholden to a tool that would mindlessly drop
that grouping. But at the same time, that tool may be the lesser evil if
it saves time adjusting (and reviewing) style. I'll continue to observe
before forming more inclusions. Thanks for reporting on your "make
style" experiments.

-Peff



[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