summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcoccinelle-commit.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/coccinelle-commit.sh b/coccinelle-commit.sh
new file mode 100755
index 0000000..ca48aad
--- /dev/null
+++ b/coccinelle-commit.sh
@@ -0,0 +1,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"