X-Git-Url: https://git.octo.it/?p=git.git;a=blobdiff_plain;f=git-rebase.sh;h=e6b57b8ab9595be2875f328c0a8b0f2f58897793;hp=9e259028e087e6eb33bd338855aa12f9ebb10ae9;hb=HEAD;hpb=fd60acaced6de16ebfb66959067e2b29f99a133e diff --git a/git-rebase.sh b/git-rebase.sh index 9e259028..e6b57b8a 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -12,9 +12,10 @@ It then attempts to create a new commit for each commit from the original It is possible that a merge failure will prevent this process from being completely automatic. You will have to resolve any such merge failure -and run git-rebase --continue. If you can not resolve the merge failure, -running git-rebase --abort will restore the original and remove -the working files found in the .dotest directory. +and run git rebase --continue. Another option is to bypass the commit +that caused the merge failure with git rebase --skip. To restore the +original and remove the .dotest working files, use the command +git rebase --abort instead. Note that if is not specified on the command line, the currently checked out branch is used. You must be in the top @@ -28,6 +29,11 @@ Example: git-rebase master~1 topic ' . git-sh-setup +RESOLVEMSG=" +When you have resolved this problem run \"git rebase --continue\". +If you would prefer to skip this patch, instead run \"git rebase --skip\". +To restore the original branch and stop rebasing run \"git rebase --abort\". +" unset newbase while case "$#" in 0) break ;; esac do @@ -40,7 +46,11 @@ do exit 1 ;; esac - git am --resolved --3way + git am --resolved --3way --resolvemsg="$RESOLVEMSG" + exit + ;; + --skip) + git am -3 --skip --resolvemsg="$RESOLVEMSG" exit ;; --abort) @@ -142,5 +152,6 @@ then exit 0 fi -git-format-patch -k --stdout --full-index "$upstream" ORIG_HEAD | -git am --binary -3 -k +git-format-patch -k --stdout --full-index "$upstream"..ORIG_HEAD | +git am --binary -3 -k --resolvemsg="$RESOLVEMSG" +