[Intel-gfx] [PATCH] dim: Try git-merge --ff-only before git-rebase -i when updating branches.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Dec 6 09:48:39 UTC 2016


When a branch can be fast-forwarded, try it first before rebasing.
This will prevent a whole lot of editor windows opening with 'noop'
when running dim ub.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 dim | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/dim b/dim
index fa63ae8c8a79..b2e6841e23d7 100755
--- a/dim
+++ b/dim
@@ -1286,9 +1286,7 @@ function dim_update_branches
 		repo=`branch_to_repo $branch`
 		remote=`repo_to_remote $repo`
 
-		if git diff --quiet $remote/$branch; then
-			$DRY git rebase
-		else
+		if ! $DRY git merge --ff-only ; then
 			$DRY git rebase -i
 		fi
 	done
-- 
2.7.4



More information about the Intel-gfx mailing list