git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brandon Williams <bmwill@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
	Stephan Beyer <s-beyer@gmx.net>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v3] clang-format: add a comment about the meaning/status of the
Date: Mon, 2 Oct 2017 10:21:35 -0700	[thread overview]
Message-ID: <20171002172135.GB5189@google.com> (raw)
In-Reply-To: <xmqqpoa6tp79.fsf_-_@gitster.mtv.corp.google.com>

On 10/02, Junio C Hamano wrote:
> From: Stephan Beyer <s-beyer@gmx.net>
> 
> Having a .clang-format file in a project can be understood in a way that
> code has to be in the style defined by the .clang-format file, i.e., you
> just have to run clang-format over all code and you are set.
> 
> This unfortunately is not yet the case in the Git project, as the
> format file is still work in progress.  Explain it with a comment in
> the beginning of the file.
> 
> Additionally, the working clang-format version is mentioned because the
> config directives change from time to time (in a compatibility-breaking way).
> 
> Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> 
>  * So here is a counter-proposal in a patch form.  I agree that my
>    earlier suggestion was unnecessarily verbose; this one spends
>    just as many lines and not more than the v2 round of Stephan's
>    patch.
> 
>  .clang-format | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/.clang-format b/.clang-format
> index 56822c116b..7670eec8df 100644
> --- a/.clang-format
> +++ b/.clang-format
> @@ -1,4 +1,8 @@
> -# Defaults
> +# This file is an example configuration for clang-format 5.0.
> +#
> +# Note that this style definition should only be understood as a hint
> +# for writing new code. The rules are still work-in-progress and does
> +# not yet exactly match the style we have in the existing code.

Thanks for writing up this header comment to the .clang-format file,
it's something I definitely should have included when I introduced it.

And I like the wording that you've both settled on, as it reflects our
intentions (of having the code eventually conform to the format rules)
and making note that this set of rules still needs to be tuned.


Thanks!

>  
>  # Use tabs whenever we need to fill whitespace that spans at least from one tab
>  # stop to the next one.
> -- 
> 2.14.2-820-gefeff4fbff
> 

-- 
Brandon Williams

  parent reply	other threads:[~2017-10-02 17:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 18:26 [PATCH] clang-format: adjust line break penalties Johannes Schindelin
2017-09-29 18:40 ` Jonathan Nieder
2017-09-29 19:50   ` Brandon Williams
2017-09-29 22:39   ` Stephan Beyer
2017-09-29 22:45     ` Jonathan Nieder
2017-09-30 21:37       ` [PATCH] Add a comment to .clang-format about the meaning of the file Stephan Beyer
2017-10-01  2:45         ` Junio C Hamano
2017-10-01 15:44       ` [PATCH v2] " Stephan Beyer
2017-10-01 20:30         ` Junio C Hamano
2017-10-01 21:29           ` Stephan Beyer
2017-10-01 23:37         ` [PATCH v3] clang-format: add a comment about the meaning/status of the Junio C Hamano
2017-10-02 17:16           ` Stephan Beyer
2017-10-02 17:21           ` Brandon Williams [this message]
2017-10-03  1:08             ` Ramsay Jones
2017-10-01  2:40   ` [PATCH] clang-format: adjust line break penalties 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20171002172135.GB5189@google.com \
    --to=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=jrnieder@gmail.com \
    --cc=s-beyer@gmx.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).