[Intel-gfx] [maintainer-tools PATCH 05/30] qf: Move "rebase" from case to new subcommand.

Rodrigo Vivi rodrigo.vivi at intel.com
Mon Aug 21 20:10:55 UTC 2017


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

Cc: Jani Nikula <jani.nikula at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 qf | 43 ++++++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/qf b/qf
index cc8bd9023365..f858d6e67dba 100755
--- a/qf
+++ b/qf
@@ -170,27 +170,6 @@ function quilt_clean_check
 }
 
 case "$1" in
-	rebase)
-		cd_toplevel
-		repo_check 0
-
-		if [[ -z $2 ]] ; then
-			echo No commit given
-			exit 4
-		fi
-
-		new_baseline=`git rev-parse $2`
-
-		current_top=`quilt top`
-		quiet_pop_all
-		echo Resetting baseline to $new_baseline
-		git reset --hard $new_baseline
-		sed -e "s/BASELINE=.*$/BASELINE=$new_baseline/" -i patches/config
-		git update-ref refs/baselines/$branch/$new_baseline $new_baseline
-
-		quilt push $current_top -q
-
-		;;
 	refresh)
 		cd_toplevel
 		repo_check 0
@@ -474,6 +453,28 @@ function qf_checkout
 	echo Now at `quilt top`
 }
 
+function qf_rebase
+{
+	cd_toplevel
+	repo_check 0
+
+	if [[ -z $1 ]] ; then
+		echo No commit given
+		exit 4
+	fi
+
+	new_baseline=`git rev-parse $1`
+
+	current_top=`quilt top`
+	quiet_pop_all
+	echo Resetting baseline to $new_baseline
+	git reset --hard $new_baseline
+	sed -e "s/BASELINE=.*$/BASELINE=$new_baseline/" -i patches/config
+	git update-ref refs/baselines/$branch/$new_baseline $new_baseline
+
+	quilt push $current_top -q
+}
+
 function qf_help
 {
 	manpage=$DIM_PREFIX/maintainer-tools/qf.rst
-- 
2.13.2



More information about the Intel-gfx mailing list