git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] style: the opening '{' of a function is in a separate line

From
Duy Nguyen <pclouds@gmail.com>
Date
Dec 10, 2018, 18:51 UTC
Message-ID
<CACsJy8B=C05jc512yTRBy6s6BPu0kvfCo2mgoD7O-N29adMnKg@mail.gmail.com>
In-Reply-To
<CAGZ79kZpcgRFs=2NgaYHUAfRQ16u-LG7CjEJJg4+=oxUQ6Bbnw@mail.gmail.com>
On Mon, Dec 10, 2018 at 7:47 PM Stefan Beller <sbeller@google.com> wrote:
Show 23 quoted lines
>
> On Sun, Dec 9, 2018 at 2:25 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> >
> > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> > ---
> >  bisect.c                   | 3 ++-
> >  builtin/config.c           | 3 ++-
> >  builtin/push.c             | 4 +++-
> >  convert.c                  | 3 ++-
> >  credential-cache--daemon.c | 3 ++-
> >  diff.c                     | 6 ++++--
> >  git.c                      | 3 ++-
> >  imap-send.c                | 3 ++-
> >  remote-curl.c              | 3 ++-
> >  sequencer.c                | 6 ++++--
> >  string-list.c              | 3 ++-
> >  t/helper/test-sigchain.c   | 3 ++-
> >  transport-helper.c         | 3 ++-
> >  url.c                      | 3 ++-
> >  userdiff.c                 | 3 ++-
> >  15 files changed, 35 insertions(+), 17 deletions(-)
>
> Can you say more about how you found these?

I was updating diff.c (65 patches coming soon!) and found one function that triggered me. "git grep '^static.*) {$'" caught most of them. A bit more regex got some more but I don't even know if I have caught them all.

> (Are these all of them, or did you look through some subset of files?)
I left compat and xdiff directories out if I remember correctly.
> Or did you use a formatting tool?
Unfortunately no. Perhaps clang-format can do it? I didn't try.
-- 
Duy
Previous: Stefan Beller
Message 3 of 3 in “style: the opening '{' of a function is in a separate line”
  1. style: the opening '{' of a function is in a separate lineNguyễn Thái Ngọc Duy, Dec 9, 2018
  2. Stefan BellerDec 10, 2018
  3. Duy NguyenDec 10, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.