diff --git a/dim b/dim index 547017562d5013e2e906e9c30adbbd24d199dd14..408a3fbe2d20bd5240828612e513287c1542127a 100755 --- a/dim +++ b/dim @@ -719,9 +719,10 @@ function find_fixup_file # repo branch echo "$file_path" } -function dim_rebuild_tip +function dim_rebuild_tip # local_branch { - local integration_branch specfile first rerere repo remote + local integration_branch specfile first rerere repo remote local_branch + local_branch=$1 integration_branch=drm-tip specfile=$(mktemp) @@ -760,7 +761,10 @@ function dim_rebuild_tip remote=$(repo_to_remote $repo) sha1=$remote/$branch - if [[ "$repo" = "$remote" ]]; then + if [[ $DRY_RUN ]] && [[ "$local_branch" = "$branch" ]]; then + echo -n "Merging (local) $branch... " + sha1=$(git rev-parse $branch) + elif [[ "$repo" = "$remote" ]]; then echo -n "Merging $repo/$branch... " else echo -n "Merging $repo/$branch (local remote $remote)... " diff --git a/dim.rst b/dim.rst index 53c222d6752a17f503dc31f2d0c4c5d68a985ee3..050a12a0782ccc4fc6fd8de2f1c23bc84d0926f3 100644 --- a/dim.rst +++ b/dim.rst @@ -202,9 +202,11 @@ push [*git push arguments*] --------------------------- **push-branch** shorthand for the current branch. -rebuild-tip ------------ -Rebuild and push the integration tree. +rebuild-tip [local_branch] +-------------------------- +Rebuild and push the integration tree. In dry-run mode/-d the branch is +rebuilt without pushing and it's possible to use one local branch +as argument to check if merging that branch creates conflicts. ADVANCED COMMANDS FOR COMMITTERS AND MAINTAINERS ================================================