Skip to content
Snippets Groups Projects
Commit bca8dd2f authored by Rodrigo Vivi's avatar Rodrigo Vivi
Browse files

qf: Move "checkout" from case to new subcommand.


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

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 83b35e9f
No related merge requests found
......@@ -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=$(dirname $(readlink -f $0))/qf.rst
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment