#!/bin/bash # Helper script to use a Coccinelle semantic patch as a commit message # USAGE: coccinelle-commit.sh | 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"