[PATCH] D80978: Add a git hook script that can be manually setup to run some checks on every push

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 12:42:36 PDT 2020


mehdi_amini marked an inline comment as done.
mehdi_amini added inline comments.
Herald added a reviewer: aaron.ballman.


================
Comment at: llvm/utils/git/arcfilter.sh:6
+  sed  's/^Summary://'  | \
+  awk '/Reviewers: /{p=1; sub(/Reviewers: .*Differential Revision: /, "")}; /Differential Revision: /{p=0;}; !p' | \
+  git commit --amend -F - ; }
----------------
MaskRay wrote:
> mehdi_amini wrote:
> > mehdi_amini wrote:
> > > MaskRay wrote:
> > > > This version handles both `Summay: ...` (on the same line) and `Summary:\nmulti lines`
> > > > 
> > > > ```
> > > > git log -1 --pretty=%B | awk '/Reviewers:|Subscribers:/{p=1} /Reviewed By:|Differential Revision:/{p=0} !p && !/^Summary:$/ {sub(/^Summary: /,"");print}' | git commit --amend --date=now -F -
> > > > ```
> > > > 
> > > > In addition, I added `--date=now` to reset author date to committer date.
> > > I'll update the `awk`, why should we add `--date=now` ?
> > Done, but still ping @MaskRay in case you missed my question? (I'm curious)
> Author dates (git log default) seem to be random. They are oftentimes misleading. (For example, it is difficult to tell whether a commit was really made yesterday) I changed my git log config to display committer dates by default, but many don't. Resetting my commits will make others easier when reading my commits.
> 
OK, does it LGTY now?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80978/new/

https://reviews.llvm.org/D80978





More information about the llvm-commits mailing list