]> git.ozlabs.org Git - next-scripts/commitdiff
do_merge: we have had no rebasing trees for some time
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 26 Jul 2019 00:19:23 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 26 Jul 2019 00:19:23 +0000 (10:19 +1000)
except Andrew's - and that is handled separately

do_merge

index 1618be3edeaff5f41e68d78d7882de24476bc811..01d7f1c01bbdc1220680286639b0419a2780d264 100755 (executable)
--- a/do_merge
+++ b/do_merge
@@ -32,56 +32,6 @@ execute()
        return "${PIPESTATUS[0]}"
 }
 
-do_rebase()
-{
-       rbase=${1#*/}
-       rbase="$2/${rbase%%:*}"
-       rtop="$2/${1#*:}"
-       rbid=$(git rev-parse "$rbase")
-       rtid=$(git rev-parse "$rtop")
-       [ "$rbid" = "$rtid" ] && {
-               echo Empty tree
-               return
-       }
-       [ "$(git rev-list HEAD..$rtop)" ] || {
-               echo Already merged
-               return
-       }
-       execute git clone -s -l -n -q . ../rebase-tmp || {
-               echo Clone failed 1>&2
-               bash -i || exit
-       }
-       log '$' cd ../rebase-tmp
-       cd ../rebase-tmp
-       execute git fetch --no-tags ../next "refs/remotes/$rtop:$rtop" || {
-               echo Fetch of top failed 1>&2
-               bash -i || exit
-       }
-       execute git fetch --no-tags ../next "refs/remotes/$rbase:$rbase" || {
-               echo Fetch of base failed 1>&2
-               bash -i || exit
-       }
-       execute git checkout "$rtop" || {
-               echo Checkout of top failed 1>&2
-               bash -i || exit
-       }
-       execute git rebase --onto master "$rbase" || {
-               echo Rebase failed 1>&2
-               bash -i || exit
-       }
-       log '$' cd ../next
-       cd ../next
-       execute git pull -f ../rebase-tmp "$rtop" || {
-               echo Pull failed 1>&2
-               echo "$h" >>../merge.debug
-               git diff >>../merge.debug 2>&1
-               git diff 2>&1 | egrep -q '<<<<<|^\*' && {
-                       bash -i || exit
-               }
-       }
-       execute rm -rf ../rebase-tmp
-}
-
 [ -n "$start_from" ] || {
        cp /dev/null "$LOG_FILE"
        execute date -R
@@ -122,36 +72,29 @@ for h in $heads; do
                done
        }
        log Merging "$h" "($hlog)"
-       case "$h" in
-       *:*)
-               do_rebase "$h" "$tree"
-               ;;
-       *)
-               execute git merge "$h" || {
-                       echo Merge failed 1>&2
-                       echo "$h" >>../merge.debug
-                       git diff >>../merge.debug 2>&1
-
-                       check_unmerged_files "$tree"
-
-                       git diff 2>&1 | egrep -q '<<<<<|^\*' && {
-                               linux-next-notify "new conflict found merging $tree"
-                               if [ -f "../merge-fixes/$tree" ]; then
-                                       echo "Merge fixes exist for this tree:"
-                                       cat "../merge-fixes/$tree"
-                               fi
+       execute git merge "$h" || {
+               echo Merge failed 1>&2
+               echo "$h" >>../merge.debug
+               git diff >>../merge.debug 2>&1
+
+               check_unmerged_files "$tree"
+
+               git diff 2>&1 | egrep -q '<<<<<|^\*' && {
+                       linux-next-notify "new conflict found merging $tree"
+                       if [ -f "../merge-fixes/$tree" ]; then
+                               echo "Merge fixes exist for this tree:"
+                               cat "../merge-fixes/$tree"
+                       fi
+                       bash -i || exit
+               }
+#              [ "$(git status --porcelain)" ] && {
+                       GIT_EDITOR=: execute git commit -v -a || {
+                               linux-next-notify "next commit failed for $tree"
                                bash -i || exit
                        }
-#                      [ "$(git status --porcelain)" ] && {
-                               GIT_EDITOR=: execute git commit -v -a || {
-                                       linux-next-notify "next commit failed for $tree"
-                                       bash -i || exit
-                               }
-                               execute git diff -M --stat --summary 'HEAD^..'
-#                      }
-               }
-               ;;
-       esac
+                       execute git diff -M --stat --summary 'HEAD^..'
+#              }
+       }
        [ -f "../merge-fixes/$tree" ] && {
                for p in $(cat "../merge-fixes/$tree"); do
                        "$bin_dir/merge_fix" -n "$p" || {