All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Jackson <ian.jackson@citrix.com>, Jan Beulich <JBeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Tim Deegan <tim@xen.org>, Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] CODING_STYLE: explicitly call out label indentation
Date: Tue, 27 Nov 2018 16:48:59 +0000	[thread overview]
Message-ID: <35a60c3a-8b80-c5e8-48e9-f65fb9828364@citrix.com> (raw)
In-Reply-To: <23549.28476.853916.355490@mariner.uk.xensource.com>

On 27/11/2018 16:22, Ian Jackson wrote:
> Since there was some confusion about what we are talking about, see
> below.  Obviously the diff output in my `1' test cases is
> prefereable.   Note that `git diff' does the same thing as diff -p
> (and it doesn't even need a -p option to do it).

After some investigation, git does the correct thing when you ask to
treat c files as c files.

andrewcoop@andrewcoop:~$ cat .config/git/attributes
*.[hc] diff=cpp

This has the additional side effect of making `git diff --color-words`
and friends far more legible and nice to use.  Its a shame this isn't
the default.

> I also observe that by default, emacs wants to indent the label by 1
> character - even though usually it likes to align labels to the LHS of
> the enclosing block.  Presumably for this reason.

And after some investigation, emacs does the wrong thing in the Xen tree
because we explicitly ask for BSD style in the local block.

We should make a choice, then fix our automatic tooling to not force
code to be non-compliant.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-11-27 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26  9:04 [PATCH] CODING_STYLE: explicitly call out label indentation Jan Beulich
2018-11-27 15:23 ` Wei Liu
2018-11-27 15:40   ` Jan Beulich
2018-11-27 16:22     ` Ian Jackson
2018-11-27 16:48       ` Andrew Cooper [this message]
2018-11-27 17:09         ` George Dunlap
2018-11-27 17:17           ` Jan Beulich

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=35a60c3a-8b80-c5e8-48e9-f65fb9828364@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=ian.jackson@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.