No functional change. Only moving from the case
to its own function.

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 | 56 +++++++++++++++++++++++++++++---------------------------
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/qf b/qf
index d9650f44e370..1e5594eaf223 100755
--- a/qf
+++ b/qf
@@ -170,33 +170,6 @@ function quilt_clean_check
 }
 
 case "$1" in
-       push)
-               cd_toplevel
-               repo_check 0
-               quilt_clean_check
-
-               remote=`git config branch.$branch.remote`
-
-               export_quilt_sha=`git notes --ref=quilt show $branch | grep 
Quilt-Commit | cut -d ' ' -f 2`
-               quilt_sha=`cd patches ; git rev-parse $quilt_branch`
-
-               if [[ $export_quilt_sha != $quilt_sha ]] ; then
-                       echo Quilt export is out of date, aborting
-                       echo $export_quilt_sha
-                       echo $quilt_sha
-                       exit 18
-               fi
-
-               cd patches
-               git push $remote $quilt_branch:refs/quilts/$branch
-               cd ..
-
-               # The exported branch is a rebasing one, so force the push.
-               # Everything else shouldn't ever need a force-push.
-               git push $remote $branch -f
-
-               git push $remote 
refs/baselines/$branch/*:refs/baselines/$branch/*
-               ;;
        fetch)
                cd_toplevel
                repo_check 0
@@ -483,6 +456,35 @@ function qf_export_visualize
        gitk QUILT_EXPORT ^$baseline
 }
 
+function qf_push
+{
+       cd_toplevel
+       repo_check 0
+       quilt_clean_check
+
+       remote=`git config branch.$branch.remote`
+
+       export_quilt_sha=`git notes --ref=quilt show $branch | grep 
Quilt-Commit | cut -d ' ' -f 2`
+       quilt_sha=`cd patches ; git rev-parse $quilt_branch`
+
+       if [[ $export_quilt_sha != $quilt_sha ]] ; then
+               echo Quilt export is out of date, aborting
+               echo $export_quilt_sha
+               echo $quilt_sha
+               exit 18
+       fi
+
+       cd patches
+       git push $remote $quilt_branch:refs/quilts/$branch
+       cd ..
+
+       # The exported branch is a rebasing one, so force the push.
+       # Everything else shouldn't ever need a force-push.
+       git push $remote $branch -f
+
+       git push $remote refs/baselines/$branch/*:refs/baselines/$branch/*
+}
+
 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