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

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


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

Notice that "shift" is not needed anymore since it is
getting shifted by default for all subcommands.

Also this is the last command to move from the case
block to its own function. So case block is not entirely
removed.

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 | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/qf b/qf
index c1db7231474b..bd85992faa62 100755
--- a/qf
+++ b/qf
@@ -169,15 +169,6 @@ function quilt_clean_check
 	fi
 }
 
-case "$1" in
-	gitk|k)
-		cd_toplevel
-		cd patches
-		shift
-		gitk "$@"
-		;;
-esac
-
 qf=$(basename $0)
 
 # first positional argument is the subcommand
@@ -507,6 +498,14 @@ function qf_git
 	git "$@"
 }
 
+qf_alias_k=gitk
+function qf_gitk
+{
+	cd_toplevel
+	cd patches
+	gitk "$@"
+}
+
 function qf_help
 {
 	manpage=$DIM_PREFIX/maintainer-tools/qf.rst
-- 
2.13.2



More information about the Intel-gfx mailing list