diff mbox

[devtools] commitpkg: make commit message more compact

Message ID 20170529080206.2187-1-bpiotrowski@archlinux.org
State Superseded
Headers show

Commit Message

Bartłomiej Piotrowski May 29, 2017, 8:02 a.m. UTC
If message is passed via argument, combine it with version in one line
for better display on svn2git. Otherwise append new two lines for
manual editing as it was before.

Signed-off-by: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
---
 commitpkg.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/commitpkg.in b/commitpkg.in
index 1f9492c..ad23c83 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -99,14 +99,14 @@  if [[ -z $server ]]; then
 fi
 
 if [[ -n $(svn status -q) ]]; then
-	msgtemplate="upgpkg: $pkgbase $(get_full_version)"$'\n\n'
+	msgtemplate="$(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}: ${1}" || die
 		stat_done
 	else
 		msgfile="$(mktemp)"
-		echo "$msgtemplate" > "$msgfile"
+		echo "$msgtemplate"$'\n\n' > "$msgfile"
 		if [[ -n $SVN_EDITOR ]]; then
 			$SVN_EDITOR "$msgfile"
 		elif [[ -n $VISUAL ]]; then