public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: Alexandre Oliva <oliva@adacore.com>
Subject: Ping Re: [PATCH] contrib: add git gcc-style alias
Date: Tue, 19 Dec 2023 12:40:38 -0500	[thread overview]
Message-ID: <2bfeed48-e237-4dcb-802e-1acc111ff69b@redhat.com> (raw)
In-Reply-To: <20231212030031.1023808-1-jason@redhat.com>

On 12/11/23 22:00, Jason Merrill wrote:
> OK for trunk?

Ping.  CCing Alex because this could plausibly be considered build 
machinery, and he's had useful feedback on my sh code before.

> -- 8< --
> 
> I thought it could be easier to use check_GNU_style.py.  With this alias,
> 'git gcc-style' will take a git revision as argument instead of a file, or
> check HEAD if no argument is given.
> 
> contrib/ChangeLog:
> 
> 	* gcc-git-customization.sh: Add git gcc-style alias.
> ---
>   contrib/gcc-git-customization.sh | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/contrib/gcc-git-customization.sh b/contrib/gcc-git-customization.sh
> index 2e173e859d7..54bd35ea1aa 100755
> --- a/contrib/gcc-git-customization.sh
> +++ b/contrib/gcc-git-customization.sh
> @@ -30,6 +30,11 @@ git config alias.gcc-backport '!f() { "`git rev-parse --show-toplevel`/contrib/g
>   git config alias.gcc-fix-changelog '!f() { "`git rev-parse --show-toplevel`/contrib/git-fix-changelog.py" $@; } ; f'
>   git config alias.gcc-mklog '!f() { "`git rev-parse --show-toplevel`/contrib/mklog.py" $@; } ; f'
>   git config alias.gcc-commit-mklog '!f() { "`git rev-parse --show-toplevel`/contrib/git-commit-mklog.py" "$@"; }; f'
> +git config alias.gcc-style '!f() {
> +    check=`git rev-parse --show-toplevel`/contrib/check_GNU_style.py;
> +    arg=; if [ $# -ge 1 ] && [ "$1" != "-f" ]; then arg="$1"; shift;
> +    elif [ $# -eq 3 ]; then arg="$3"; set -- "$1" "$2"; fi
> +    git show $arg | $check "$@" -; }; f'
>   
>   # Make diff on MD files use "(define" as a function marker.
>   # Use this in conjunction with a .gitattributes file containing
> 
> base-commit: 074c6f15f7a28c620c756f18c2a310961de00539


  reply	other threads:[~2023-12-19 17:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12  3:00 Jason Merrill
2023-12-19 17:40 ` Jason Merrill [this message]
2023-12-20  7:39   ` Ping " Richard Biener
2023-12-20 23:10     ` Jason Merrill
2023-12-20 23:04   ` Alexandre Oliva
2023-12-20  5:10 ` Jeff Law

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=2bfeed48-e237-4dcb-802e-1acc111ff69b@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=oliva@adacore.com \
    /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 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).