X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-am.sh;h=9df951a597d6b9ec5f7f390c35a60adb942a3fdc;hb=6d84bcb5de78251d98f7d3e80e822d9a4b8f4df3;hp=2f46fda47bc1aa0a345c5cb7293724497965d75e;hpb=5fc9df08b564aa9d11265ad591f9ef104695ce2b;p=git.git diff --git a/git-am.sh b/git-am.sh index 2f46fda47..9df951a59 100755 --- a/git-am.sh +++ b/git-am.sh @@ -25,7 +25,8 @@ p= pass it through git-apply patch-format= format the patch(es) are in reject pass it through git-apply resolvemsg= override error message when patch failure occurs -r,resolved to be used after a patch failure +continue continue applying patches after resolving a conflict +r,resolved synonyms for --continue skip skip the current patch abort restore the original branch and abort the patching operation. committer-date-is-author-date lie about committer date @@ -205,7 +206,8 @@ check_patch_format () { # discarding the indented remainder of folded lines, # and see if it looks like that they all begin with the # header field names... - sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" | + tr -d '\015' <"$1" | + sed -n -e '/^$/q' -e '/^[ ]/d' -e p | sane_egrep -v '^[!-9;-~]+:' >/dev/null || patch_format=mbox fi @@ -317,7 +319,7 @@ do scissors=t ;; --no-scissors) scissors=f ;; - -r|--resolved) + -r|--resolved|--continue) resolved=t ;; --skip) skip=t ;; @@ -661,10 +663,7 @@ do [eE]*) git_editor "$dotest/final-commit" action=again ;; [vV]*) action=again - : ${GIT_PAGER=$(git var GIT_PAGER)} - : ${LESS=-FRSX} - export LESS - $GIT_PAGER "$dotest/patch" ;; + git_pager "$dotest/patch" ;; *) action=again ;; esac done @@ -774,6 +773,5 @@ do go_next done -git gc --auto - rm -fr "$dotest" +git gc --auto