From owner-dev-commits-ports-all@freebsd.org Fri Jun 4 12:04:15 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E3E564DA5D; Fri, 4 Jun 2021 12:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FxLz32cRtz3LG4; Fri, 4 Jun 2021 12:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CE761CE99; Fri, 4 Jun 2021 12:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 154C4FNl027813; Fri, 4 Jun 2021 12:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 154C4FKr027812; Fri, 4 Jun 2021 12:04:15 GMT (envelope-from git) Date: Fri, 4 Jun 2021 12:04:15 GMT Message-Id: <202106041204.154C4FKr027812@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Mathieu Arnold Subject: git: d1c97575f0c5 - 2021Q2 - .hooks/prepare-commit-msg: Cleanup. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mat X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: d1c97575f0c50b8c18d1958eefb258ba7b176452 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2021 12:04:15 -0000 The branch 2021Q2 has been updated by mat: URL: https://cgit.FreeBSD.org/ports/commit/?id=d1c97575f0c50b8c18d1958eefb258ba7b176452 commit d1c97575f0c50b8c18d1958eefb258ba7b176452 Author: Mathieu Arnold AuthorDate: 2021-06-04 11:52:18 +0000 Commit: Mathieu Arnold CommitDate: 2021-06-04 12:03:53 +0000 .hooks/prepare-commit-msg: Cleanup. Instead of writing everything in the new commit template all at once in a large here document, do it cleanly one command at a time. (cherry picked from commit d744a8de4295aa3ba4fc6caf011743d661d98e29) --- .hooks/prepare-commit-msg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.hooks/prepare-commit-msg b/.hooks/prepare-commit-msg index 12f26c74d0b6..88440fee43cc 100755 --- a/.hooks/prepare-commit-msg +++ b/.hooks/prepare-commit-msg @@ -26,6 +26,7 @@ merge) esac outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) +exec 3> "$outfile" # Create a commit message template from three parts: # @@ -38,8 +39,9 @@ outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) # line to the end of the file) which lists files staged for commit, files # not staged, and untracked files. -cat >"$outfile" <&3 + +cat >&3 < # 72 columns --| @@ -65,7 +67,10 @@ $(awk '1;/^#$/{exit}' "$1") # # "Pull Request" and "Differential Revision" require the *full* GitHub or # Phabricator URL. -$(awk '/^#$/,EOF' "$1") EOF +awk '/^#$/,EOF' "$1" >&3 + +exec 3>&- + mv "$outfile" "$1"