Re: [petsc-dev] make checkclangformat checkbadSource dependencies

2023-06-22 Thread Barry Smith
Urgg, precommit does not appear to play well with git gui. I am getting git gui hanging on call pre-commit hook > On Jun 19, 2023, at 9:17 AM, Barry Smith wrote: > > > I just found out my script was woefully incomplete. It is probably still > wrong even with this change but needs > > c

Re: [petsc-dev] make checkclangformat checkbadSource dependencies

2023-06-19 Thread Barry Smith
I just found out my script was woefully incomplete. It is probably still wrong even with this change but needs current_source=$(git diff --staged --name-only | egrep "(\.[chF]'|\.F90|\.hpp|\.cpp|\.cxx|\.cu)" | tr '\n' ' ') > On Jun 18, 2023, at 7:51 PM, Barry Smith wrote: > > > Jaco

Re: [petsc-dev] make checkclangformat checkbadSource dependencies

2023-06-18 Thread Barry Smith
Jacobi, Thanks for the reminder about using hooks for this purpose. Perhaps git hooks are not understood well enough at the time by the masses (that is, me), or perhaps hooks were presented as THE solution, not as a tool for helping users to get to the solution? That is, git-hooks as a wa

Re: [petsc-dev] make checkclangformat checkbadSource dependencies

2023-06-18 Thread Jacob Faibussowitsch
> I want to automatically run make checkclangformat checkbadSource before every > git push (because I am an idiot and have too many silly failed CIs due to bad > source). What you *actually* want are git hooks (https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) combined with clang-form

[petsc-dev] make checkclangformat checkbadSource dependencies

2023-06-18 Thread Barry Smith
I have never understood how to do make rule dependencies when one is not explicitly generating new files from old ones. For example, .o from .c I want to automatically run make checkclangformat checkbadSource before every git push (because I am an idiot and have too many silly failed CIs due