Skip to content

Commit c43ad43

Browse files
committed
chore: strip Co-authored-by trailers in lefthook hooks
1 parent f4a8bca commit c43ad43

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

lefthook.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Install: lefthook install
2+
# Skip once: LEFTHOOK=0 git commit -m "..."
3+
4+
prepare-commit-msg:
5+
commands:
6+
strip-co-authored-by:
7+
run: |
8+
sed '/^[Cc]o-[Aa]uthored-[Bb]y:/d' "{1}" > "{1}.tmp" && mv "{1}.tmp" "{1}"
9+
10+
commit-msg:
11+
commands:
12+
strip-co-authored-by:
13+
run: |
14+
sed '/^[Cc]o-[Aa]uthored-[Bb]y:/d' "{1}" > "{1}.tmp" && mv "{1}.tmp" "{1}"

0 commit comments

Comments
 (0)