[devtools] commitpkg: Avoid excess blank lines

Message ID 20190917133026.3757-1-polyzen@archlinux.org
State New
Headers show
Series
  • [devtools] commitpkg: Avoid excess blank lines
Related show

Commit Message

Eli Schwartz via arch-projects Sept. 17, 2019, 1:30 p.m. UTC
Most of the time we're just bumping the pkgver and checksums, where a
commit body isn't needed.

Referencing commit ee970f0bde3c90a0dff909c366d4ab1a1bff9b9d

Signed-off-by: Daniel M. Capella <polyzen@archlinux.org>
---
 commitpkg.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Eli Schwartz via arch-projects Sept. 17, 2019, 2:34 p.m. UTC | #1
On 9/17/19 9:30 AM, Daniel M. Capella via arch-projects wrote:
> Most of the time we're just bumping the pkgver and checksums, where a
> commit body isn't needed.
> 
> Referencing commit ee970f0bde3c90a0dff909c366d4ab1a1bff9b9d

I religiously use the additional message "upstream release" in such cases.

This is important information. When there is *no* commit message, I know
that the person who committed the change is a person who dislikes commit
messages. When there is a commit message and it says 'upstream release'
or 'bump version' or whatever, then I know they put some thought into
what they're saying, and there is genuinely nothing else to say.

...

Given the original intent of the commit message was, explicitly, "let's
use commit messages and insert a couple newlines so that the committer
is ready for the commit message", I'm quite sure I don't understand your
rationale at all.

The only thing wrong with the commitpkg template is that it doesn't have
editor-specific methods for starting with the cursor at the third line.

Patch

diff --git a/commitpkg.in b/commitpkg.in
index 3fc3fa6..a626531 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -104,10 +104,10 @@  if [[ -z $server ]]; then
 fi
 
 if [[ -n $(svn status -q) ]]; then
-	msgtemplate="upgpkg: $pkgbase $(get_full_version)"$'\n\n'
+	msgtemplate="upgpkg: $pkgbase $(get_full_version)"
 	if [[ -n $1 ]]; then
 		stat_busy 'Committing changes to trunk'
-		svn commit -q -m "${msgtemplate}${1}" || die
+		svn commit -q -m "${msgtemplate}\n\n${1}" || die
 		stat_done
 	else
 		msgfile="$(mktemp)"