[Intel-gfx] [maintainer-tools RFC PATCH 15/17] dim: abstract dim_update_branches
Jani Nikula
jani.nikula at intel.com
Tue Jan 26 06:32:28 PST 2016
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
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
More information about the Intel-gfx
mailing list