[maintainer-tools PATCH 04/30] qf: Move "checkout" from case to new subcommand.

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

 



No functional change. Only moving from the
case to its own function, with the arguments now shifted.

Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
---
 qf | 47 +++++++++++++++++++++++++----------------------
 1 file changed, 25 insertions(+), 22 deletions(-)

diff --git a/qf b/qf
index 0f8c706763f8..cc8bd9023365 100755
--- a/qf
+++ b/qf
@@ -170,28 +170,6 @@ function quilt_clean_check
 }
 
 case "$1" in
-	checkout|co)
-		cd_toplevel
-
-		cd patches
-		# -q to avoid status checks - the strange remote situation
-		# confuses git and takes forever to analyze
-		if git rev-parse $2 &> /dev/null ; then
-			# raw mode
-			quilt_branch=$2
-		else
-			# quilt branch mode
-			quilt_branch=$QUILT_PREFIX$2
-		fi
-		git checkout $quilt_branch -q
-		cd ..
-		# error code 2 means no patches removed, which is ok
-		quiet_pop_all -f
-		baseline=`source patches/config ; echo $BASELINE`
-		checkout_baseline
-		quilt push -a -q > /dev/null
-		echo Now at `quilt top`
-		;;
 	rebase)
 		cd_toplevel
 		repo_check 0
@@ -471,6 +449,31 @@ function qf_setup
 	fi
 }
 
+qf_alias_co=checkout
+function qf_checkout
+{
+	cd_toplevel
+
+	cd patches
+	# -q to avoid status checks - the strange remote situation
+	# confuses git and takes forever to analyze
+	if git rev-parse $1 &> /dev/null ; then
+		# raw mode
+		quilt_branch=$1
+	else
+		# quilt branch mode
+		quilt_branch=$QUILT_PREFIX$1
+	fi
+	git checkout $quilt_branch -q
+	cd ..
+	# error code 2 means no patches removed, which is ok
+	quiet_pop_all -f
+	baseline=`source patches/config ; echo $BASELINE`
+	checkout_baseline
+	quilt push -a -q > /dev/null
+	echo Now at `quilt top`
+}
+
 function qf_help
 {
 	manpage=$DIM_PREFIX/maintainer-tools/qf.rst
-- 
2.13.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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