浏览代码

Merge pull request #4437 from SvenDowideit/tweak-DCO-hook-for-windows

Replace `echo -e` with the portable `{ echo; echo ...; }`
Tianon Gravi 11 年之前
父节点
当前提交
52d212aa6e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      contrib/prepare-commit-msg.hook

+ 4 - 1
contrib/prepare-commit-msg.hook

@@ -4,4 +4,7 @@
 #
 GH_USER=$(git config --get github.user)
 SOB=$(git var GIT_AUTHOR_IDENT | sed -n "s/^\(.*>\).*$/Docker-DCO-1.1-Signed-off-by: \1 \(github: $GH_USER\)/p")
-grep -qs "^$SOB" "$1" || echo -e "\n$SOB" >> "$1"
+grep -qs "^$SOB" "$1" || { 
+	echo 
+	echo "$SOB" 
+} >> "$1"