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.nik...@intel.com>
Cc: Daniel Vetter <daniel.vet...@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.v...@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

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

Reply via email to