[Intel-gfx] [maintainer-tools RFC PATCH 03/17] dim: rename dim_co to dim_checkout
Jani Nikula
jani.nikula at intel.com
Tue Jan 26 06:32:16 PST 2016
Rename to match the (long) subcommand name. Move error checking to the
function too.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
dim | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/dim b/dim
index 5a074979055d..22c19e8f5362 100755
--- a/dim
+++ b/dim
@@ -430,8 +430,13 @@ function dim_cd
cd $path
}
-function dim_co
+function dim_checkout
{
+ if [[ "x$1" = "x" ]]; then
+ echo "usage: $0 $subcommand branch"
+ exit 1
+ fi
+
dim_cd $1
if ! git branch | grep $1 > /dev/null ; then
git checkout -t $DIM_DRM_INTEL_REMOTE/$1
@@ -734,14 +739,14 @@ case "$subcommand" in
check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
for branch in $dim_branches ; do
- dim_co $branch
+ dim_checkout $branch
if git diff --quiet $DIM_DRM_INTEL_REMOTE/$branch; then
$DRY git rebase
else
$DRY git rebase -i
fi
done
- dim_co drm-intel-next
+ dim_checkout drm-intel-next
$DRY git reset --hard $DIM_DRM_INTEL_REMOTE/drm-intel-next
# TODO: Restore -nightly merge state from the rerere-cache
# branch
@@ -780,20 +785,16 @@ case "$subcommand" in
dim_push_branch drm-intel-fixes "$@"
;;
checkout|co)
- if [[ "x$1" = "x" ]]; then
- echo "usage: $0 $subcommand branch"
- exit 1
- fi
- dim_co "$@"
+ dim_checkout "$@"
;;
conq)
- dim_co drm-intel-next-queued
+ dim_checkout drm-intel-next-queued
;;
cof)
- dim_co drm-intel-fixes
+ dim_checkout drm-intel-fixes
;;
conf)
- dim_co drm-intel-next-fixes
+ dim_checkout drm-intel-next-fixes
;;
apply-branch|ab|sob)
dim_apply_branch "$@"
--
2.1.4
More information about the Intel-gfx
mailing list