From 744a64c6fd9011b3899a44f93d398410a850ea81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20Osztrogon=C3=A1c?= Date: Tue, 27 Aug 2019 18:28:43 +0200 Subject: [PATCH] The sample git hook shouldn't duplicate signed-off (#3022) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu --- CONTRIBUTING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2c5781409..014feb50b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,7 +92,10 @@ commit_msg_filepath = sys.argv[1] with open(commit_msg_filepath, "r+") as f: content = f.read() f.seek(0, 0) - f.write("%s\n\nJerryScript-DCO-1.0-Signed-off-by: " % content) + if "Signed-off-by" not in content: + f.write("\n\nJerryScript-DCO-1.0-Signed-off-by: \n%s" % content) + else: + f.write(content) ``` Please refer [Git Hooks](http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for more information.