From 7bf77efc87eed09fca1cc665f3fc9b4107005834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 2 Jun 2022 13:13:54 +0200 Subject: [PATCH] add newline when creating status-go diff link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise Fugitive plugin in Vim complains about it. Signed-off-by: Jakub SokoĊ‚owski --- scripts/hooks/prepare-commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/hooks/prepare-commit-msg b/scripts/hooks/prepare-commit-msg index 8cd2e832d3..092ec04152 100755 --- a/scripts/hooks/prepare-commit-msg +++ b/scripts/hooks/prepare-commit-msg @@ -16,7 +16,7 @@ COMMIT_MSG_FILE=$1 # Check if the commit message already contains the link (rebase) and update otherwise insert into line2 if ! grep -qF "${GITHUB_LINK_PREFIX}" "${COMMIT_MSG_FILE}" >/dev/null; then sed -in'' -e "2i\\ -${GITHUB_LINK}\n" "${COMMIT_MSG_FILE}" +\n${GITHUB_LINK}" "${COMMIT_MSG_FILE}" else sed -in'' -e "s;^${GITHUB_LINK_PREFIX}.*$;${GITHUB_LINK};" "${COMMIT_MSG_FILE}" fi