Signed-off-by: Jani Nikula <[email protected]>
---
 dim | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/dim b/dim
index b50656cf80a0..26ab728efb16 100755
--- a/dim
+++ b/dim
@@ -629,6 +629,27 @@ function dim_pull_request
                "$addr_drm_maintainer"
 }
 
+function dim_update_branches
+{
+       cd $DIM_PREFIX/$DIM_DRM_INTEL
+       git fetch $DIM_DRM_INTEL_REMOTE
+       check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
+
+       for branch in $dim_branches ; do
+               dim_checkout $branch
+               if git diff --quiet $DIM_DRM_INTEL_REMOTE/$branch; then
+                       $DRY git rebase
+               else
+                       $DRY git rebase -i
+               fi
+       done
+       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
+       update_rerere_cache
+}
+
 function dim_setup
 {
        if [ ! -d $DIM_PREFIX ]; then
@@ -766,25 +787,6 @@ fi
 # XXX: abscract each case to a dim_ prefixed function, and turn the help|*) 
case
 # into an else branch in the above check for functions.
 case "$subcmd" in
-       update-branches)
-               cd $DIM_PREFIX/$DIM_DRM_INTEL
-               git fetch $DIM_DRM_INTEL_REMOTE
-               check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
-
-               for branch in $dim_branches ; do
-                       dim_checkout $branch
-                       if git diff --quiet $DIM_DRM_INTEL_REMOTE/$branch; then
-                               $DRY git rebase
-                       else
-                               $DRY git rebase -i
-                       fi
-               done
-               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
-               update_rerere_cache
-               ;;
        for-each-workdirs)
                cd $DIM_PREFIX/$DIM_DRM_INTEL
                $@
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to