[maintainer-tools PATCH v2 01/33] dim: rename dim_push to dim_push_branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename to match the subcommand name. Move error checking to the function
too.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 dim | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/dim b/dim
index e08fdffd3d86..faa98114a027 100755
--- a/dim
+++ b/dim
@@ -349,8 +349,13 @@ function update_nightly
 
 # push branch $1, rebuild nightly. the rest of the arguments are passed to git
 # push.
-function dim_push
+function dim_push_branch
 {
+	if [[ "x$1" = "x" ]]; then
+		echo "usage: $0 $subcommand branch"
+		exit 1
+	fi
+
 	branch=$1
 	shift
 
@@ -773,20 +778,16 @@ case "$subcommand" in
 		cat > `cat .fixup_file_path`
 		;;
 	push-branch)
-		if [[ "x$1" = "x" ]]; then
-			echo "usage: $0 $subcommand branch"
-			exit 1
-		fi
-		dim_push "$@"
+		dim_push_branch "$@"
 		;;
 	push-queued|pq)
-		dim_push drm-intel-next-queued "$@"
+		dim_push_branch drm-intel-next-queued "$@"
 		;;
 	push-next-fixes|pnf)
-		dim_push drm-intel-next-fixes "$@"
+		dim_push_branch drm-intel-next-fixes "$@"
 		;;
 	push-fixes|pf)
-		dim_push drm-intel-fixes "$@"
+		dim_push_branch drm-intel-fixes "$@"
 		;;
 	checkout|co)
 		if [[ "x$1" = "x" ]]; then
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux