[dim PATCH 1/3] dim: Move tag_summary and tag_branch functions

Sean Paul seanpaul at chromium.org
Fri Feb 2 20:08:09 UTC 2018


Moving these above all call-sites to improve readability when I add
functionality later in this series

Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
 dim | 64 ++++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/dim b/dim
index 3639ada1854b..9837729348bb 100755
--- a/dim
+++ b/dim
@@ -1604,6 +1604,38 @@ function dim_for_each_workdir
 	done
 }
 
+function tag_summary # branch
+{
+	local branch tag_template
+	branch=$1
+	tag_template=$DIM_PREFIX/drm-rerere/tag-templates/${branch//\//-}.txt
+
+	if [ -r $tag_template ]; then
+		cat $tag_template
+	else
+		cat <<-EOF
+		UAPI Changes:
+
+		Cross-subsystem Changes:
+
+		Core Changes:
+
+		Driver Changes:
+
+		EOF
+	fi
+}
+
+function tag_branch
+{
+	local tag branch
+	tag=$1
+	branch=$2
+
+	tag_summary $branch | $DRY git tag -F- $tag "$branch@{upstream}"
+	$DRY git tag -a $DIM_GPG_KEYID -f $tag
+}
+
 function dim_update_next
 {
 	local remote
@@ -1706,38 +1738,6 @@ function dim_tag_next
 
 }
 
-function tag_summary # branch
-{
-	local branch tag_template
-	branch=$1
-	tag_template=$DIM_PREFIX/drm-rerere/tag-templates/${branch//\//-}.txt
-
-	if [ -r $tag_template ]; then
-		cat $tag_template
-	else
-		cat <<-EOF
-		UAPI Changes:
-
-		Cross-subsystem Changes:
-
-		Core Changes:
-
-		Driver Changes:
-
-		EOF
-	fi
-}
-
-function tag_branch
-{
-	local tag branch
-	tag=$1
-	branch=$2
-
-	tag_summary $branch | $DRY git tag -F- $tag "$branch@{upstream}"
-	$DRY git tag -a $DIM_GPG_KEYID -f $tag
-}
-
 # dim_pull_request branch upstream
 function dim_pull_request
 {
-- 
2.16.0.rc1.238.g530d649a79-goog



More information about the dim-tools mailing list