* [PATCH] contrib: add git gcc-style alias
@ 2023-12-12 3:00 Jason Merrill
2023-12-19 17:40 ` Ping " Jason Merrill
2023-12-20 5:10 ` Jeff Law
0 siblings, 2 replies; 6+ messages in thread
From: Jason Merrill @ 2023-12-12 3:00 UTC (permalink / raw)
To: gcc-patches
OK for trunk?
-- 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
--
2.39.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Ping Re: [PATCH] contrib: add git gcc-style alias
2023-12-12 3:00 [PATCH] contrib: add git gcc-style alias Jason Merrill
@ 2023-12-19 17:40 ` Jason Merrill
2023-12-20 7:39 ` Richard Biener
2023-12-20 23:04 ` Alexandre Oliva
2023-12-20 5:10 ` Jeff Law
1 sibling, 2 replies; 6+ messages in thread
From: Jason Merrill @ 2023-12-19 17:40 UTC (permalink / raw)
To: gcc-patches; +Cc: Alexandre Oliva
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ping Re: [PATCH] contrib: add git gcc-style alias
2023-12-19 17:40 ` Ping " Jason Merrill
@ 2023-12-20 7:39 ` Richard Biener
2023-12-20 23:10 ` Jason Merrill
2023-12-20 23:04 ` Alexandre Oliva
1 sibling, 1 reply; 6+ messages in thread
From: Richard Biener @ 2023-12-20 7:39 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches, Alexandre Oliva
On Tue, Dec 19, 2023 at 6:41 PM Jason Merrill <jason@redhat.com> wrote:
>
> 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.
OK in case Alex doesn't have any comments.
Btw, is there a webpage where we document our git plumbing? Would
be nice to update that with the new alias.
Richard.
> > -- 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ping Re: [PATCH] contrib: add git gcc-style alias
2023-12-20 7:39 ` Richard Biener
@ 2023-12-20 23:10 ` Jason Merrill
0 siblings, 0 replies; 6+ messages in thread
From: Jason Merrill @ 2023-12-20 23:10 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches, Alexandre Oliva
[-- Attachment #1: Type: text/plain, Size: 508 bytes --]
On 12/20/23 02:39, Richard Biener wrote:
> On Tue, Dec 19, 2023 at 6:41 PM Jason Merrill <jason@redhat.com> wrote:
>>
>> 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.
>
> OK in case Alex doesn't have any comments.
>
> Btw, is there a webpage where we document our git plumbing? Would
> be nice to update that with the new alias.
Yep, updated it thus:
[-- Attachment #2: 0001-gitwrite-add-gcc-style.patch --]
[-- Type: text/x-patch, Size: 1234 bytes --]
From 062897ff96bb9651f7a1e152bc2327cbda4ad89e Mon Sep 17 00:00:00 2001
From: Jason Merrill <jason@redhat.com>
Date: Mon, 11 Dec 2023 22:10:53 -0500
Subject: [PATCH] gitwrite: add gcc-style
To: gcc-patches@gcc.gnu.org
---
htdocs/gitwrite.html | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/htdocs/gitwrite.html b/htdocs/gitwrite.html
index 1ffda77a..0c146aba 100644
--- a/htdocs/gitwrite.html
+++ b/htdocs/gitwrite.html
@@ -432,9 +432,11 @@ repository:</p>
output. Of particular use is the
<code>--oneline</code> option to summarize the commit on a single line.
</li>
- <li><i>gcc-descr</i> - Undocumented</li>
- <li><i>gcc-undescr</i> - Undocumented</li>
+ <li><i>gcc-descr</i> - describe a commit relative to its first gcc release,
+ e.g. r12-1234</li>
+ <li><i>gcc-undescr</i> - convert a gcc-descr back to a commit SHA</li>
<li><i>gcc-verify</i> - verify ChangeLog format for a particular commit</li>
+ <li><i>gcc-style</i> - verify coding style for a particular commit</li>
<li><i>gcc-backport</i> - run script that does <code>git cherry-pick -x</code>
and reverts all modifications of ChangeLog files (both from index
and conflicting files)</li>
--
2.39.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ping Re: [PATCH] contrib: add git gcc-style alias
2023-12-19 17:40 ` Ping " Jason Merrill
2023-12-20 7:39 ` Richard Biener
@ 2023-12-20 23:04 ` Alexandre Oliva
1 sibling, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2023-12-20 23:04 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches
On Dec 19, 2023, Jason Merrill <jason@redhat.com> wrote:
> 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.
LGTM, thanks!
--
Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
Free Software Activist GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] contrib: add git gcc-style alias
2023-12-12 3:00 [PATCH] contrib: add git gcc-style alias Jason Merrill
2023-12-19 17:40 ` Ping " Jason Merrill
@ 2023-12-20 5:10 ` Jeff Law
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Law @ 2023-12-20 5:10 UTC (permalink / raw)
To: Jason Merrill, gcc-patches
On 12/11/23 20:00, Jason Merrill wrote:
> OK for trunk?
>
> -- 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.
Definitely OK. Now we just need to make it part of everyone normal work
flow.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-20 23:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-12 3:00 [PATCH] contrib: add git gcc-style alias Jason Merrill
2023-12-19 17:40 ` Ping " Jason Merrill
2023-12-20 7:39 ` Richard Biener
2023-12-20 23:10 ` Jason Merrill
2023-12-20 23:04 ` Alexandre Oliva
2023-12-20 5:10 ` Jeff Law
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).