summaryrefslogtreecommitdiff
path: root/coccinelle-commit.sh
blob: ca48aad19c9aa437b1b04a13ca5fd694e6415bab (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

# Helper script to use a Coccinelle semantic patch as a commit message
# USAGE: coccinelle-commit.sh <your_cocci_patch> | git commit -F-

head -n1 "$1" | sed 's/^\/\/[[:blank:]]*//'
echo
echo 'This patch has been generated by the following Coccinelle semantic patch:'
echo
cat "$1"