We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d8c01f7 + cd3f20d commit a504b49Copy full SHA for a504b49
hook-examples/prepare-commit-msg-nodejs
@@ -15,6 +15,10 @@ if(/COMMIT_EDITMSG/g.test(commitMessage)){
15
// opens .git/COMMIT_EDITMSG
16
contents = fs.readFileSync(commitMessage);
17
18
+ if(contents.indexOf(stdout.trim()) !== -1) {
19
+ process.exit(0);
20
+ }
21
+
22
const commentPos = contents.indexOf('# ');
23
const gitMessage = contents.slice(0, commentPos);
24
const gitComments = contents.slice(commentPos)
0 commit comments