[Intel-gfx] [maintainer-tools PATCH 04/30] qf: Move "checkout" from case to new subcommand.
Rodrigo Vivi
rodrigo.vivi at intel.com
Mon Aug 21 20:10:54 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 | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/qf b/qf
index 0f8c706763f8..cc8bd9023365 100755
--- a/qf
+++ b/qf
@@ -170,28 +170,6 @@ function quilt_clean_check
}
case "$1" in
- checkout|co)
- cd_toplevel
-
- cd patches
- # -q to avoid status checks - the strange remote situation
- # confuses git and takes forever to analyze
- if git rev-parse $2 &> /dev/null ; then
- # raw mode
- quilt_branch=$2
- else
- # quilt branch mode
- quilt_branch=$QUILT_PREFIX$2
- fi
- git checkout $quilt_branch -q
- cd ..
- # error code 2 means no patches removed, which is ok
- quiet_pop_all -f
- baseline=`source patches/config ; echo $BASELINE`
- checkout_baseline
- quilt push -a -q > /dev/null
- echo Now at `quilt top`
- ;;
rebase)
cd_toplevel
repo_check 0
@@ -471,6 +449,31 @@ function qf_setup
fi
}
+qf_alias_co=checkout
+function qf_checkout
+{
+ cd_toplevel
+
+ cd patches
+ # -q to avoid status checks - the strange remote situation
+ # confuses git and takes forever to analyze
+ if git rev-parse $1 &> /dev/null ; then
+ # raw mode
+ quilt_branch=$1
+ else
+ # quilt branch mode
+ quilt_branch=$QUILT_PREFIX$1
+ fi
+ git checkout $quilt_branch -q
+ cd ..
+ # error code 2 means no patches removed, which is ok
+ quiet_pop_all -f
+ baseline=`source patches/config ; echo $BASELINE`
+ checkout_baseline
+ quilt push -a -q > /dev/null
+ echo Now at `quilt top`
+}
+
function qf_help
{
manpage=$DIM_PREFIX/maintainer-tools/qf.rst
--
2.13.2
More information about the Intel-gfx
mailing list