[maintainer-tools PATCH 06/30] qf: Move "refresh" 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.

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 | 42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/qf b/qf
index f858d6e67dba..9b7917e214a4 100755
--- a/qf
+++ b/qf
@@ -170,26 +170,6 @@ function quilt_clean_check
 }
 
 case "$1" in
-	refresh)
-		cd_toplevel
-		repo_check 0
-
-		changed_files=`qf git status --porcelain | wc -l`
-
-		if [[ $changed_files -gt 0 ]] ; then
-			echo Quilt patch dir not clean, aborting
-			exit
-		fi
-
-		quiet_pop_all
-
-		while quilt push ; do
-			quilt refresh
-		done
-
-		# ignore "nothing to commit"
-		qf git commit -a -m "Refreshing all patches." || true
-		;;
 	clean-patches)
 		cd_toplevel
 		repo_check 0
@@ -475,6 +455,28 @@ function qf_rebase
 	quilt push $current_top -q
 }
 
+function qf_refresh
+{
+	cd_toplevel
+	repo_check 0
+
+	changed_files=`qf git status --porcelain | wc -l`
+
+	if [[ $changed_files -gt 0 ]] ; then
+		echo Quilt patch dir not clean, aborting
+		exit
+	fi
+
+	quiet_pop_all
+
+	while quilt push ; do
+		quilt refresh
+	done
+
+	# ignore "nothing to commit"
+	qf git commit -a -m "Refreshing all patches." || true
+}
+
 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