All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: John Szakmeister <john@szakmeister.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] contrib/git-credential-gnome-keyring.c: small stylistic cleanups
Date: Thu, 12 Dec 2013 15:41:50 -0800	[thread overview]
Message-ID: <xmqq8uvpskld.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: CAEBDL5Wb+fU=qX4eypt3SrAKQjWRqf9KkNDoutbt7fTsdk02rw@mail.gmail.com

John Szakmeister <john@szakmeister.net> writes:

> On Mon, Dec 9, 2013 at 1:06 PM, Junio C Hamano <gitster@pobox.com> wrote:
> [snip]
>>
>> I thought we cast without SP after the (typename), i.e.
>>
>>         gpointer *data = (gpointer *)user_data;
>
> I've found a mixture of both in the code base, and the
> CodingGuidelines doesn't say either way.  I'm happy to switch the file
> to no SP after the typename if that's the project preference.

Somewhat arbitrary and unscientific, but between

    git grep -e '[^f]([a-z_ ]* \*)[^ ]' -- \*.c | wc -l
    422
    $ git grep -e '[^f]([a-z_ ]* \*) ' -- \*.c | wc -l
    233

I see that we favor "(struct blah *)apointer" over "(int *)
apointer".  Many hits in the latter grep come from compat/
that are borrowed pieces of code we tend not to style-fix.

The leading [^f] is crudely excludes "sizeof(typename *)"; it does
not change the resulting picture in a major way, though.

Thanks.

  reply	other threads:[~2013-12-12 23:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 10:32 [PATCH] contrib/git-credential-gnome-keyring.c: small stylistic cleanups John Szakmeister
2013-12-05  0:16 ` Junio C Hamano
2013-12-07  9:37 ` Felipe Contreras
2013-12-07 10:42 ` [PATCH v2] " John Szakmeister
2013-12-09 18:06 ` [PATCH] " Junio C Hamano
2013-12-10 11:13   ` John Szakmeister
2013-12-12 23:41     ` Junio C Hamano [this message]
2013-12-13 20:07       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8uvpskld.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=john@szakmeister.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.