refs: document do_for_each_ref() and do_one_ref()
[gitweb.git] / git-am.sh
index 4598d86353885ee23f9294c90bdeb1fac19abb83..202130f888bee14e73b8cc108f39f2da8a14d23b 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -334,7 +334,7 @@ split_patches () {
                        # Since we cannot guarantee that the commit message is in
                        # git-friendly format, we put no Subject: line and just consume
                        # all of the message as the body
-                       perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
+                       LANG=C LC_ALL=C perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
                                if ($subject) { print ; }
                                elsif (/^\# User /) { s/\# User/From:/ ; print ; }
                                elsif (/^\# Date /) {
@@ -413,9 +413,6 @@ it will be removed. Please do not use it anymore."
                abort=t ;;
        --rebasing)
                rebasing=t threeway=t ;;
-       -d|--dotest)
-               die "$(gettext "-d option is no longer supported.  Do not use.")"
-               ;;
        --resolvemsg)
                shift; resolvemsg=$1 ;;
        --whitespace|--directory|--exclude|--include)
@@ -667,7 +664,7 @@ do
                        sed -e '1,/^$/d' >"$dotest/msg-clean"
                        echo "$commit" >"$dotest/original-commit"
                        get_author_ident_from_commit "$commit" >"$dotest/author-script"
-                       git diff-tree --root --binary "$commit" >"$dotest/patch"
+                       git diff-tree --root --binary --full-index "$commit" >"$dotest/patch"
                else
                        git mailinfo $keep $no_inbody_headers $scissors $utf8 "$dotest/msg" "$dotest/patch" \
                                <"$dotest/$msgnum" >"$dotest/info" ||
@@ -856,6 +853,11 @@ did you forget to use 'git add'?"
        if test $apply_status != 0
        then
                eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
+               if test "$(git config --bool advice.amworkdir)" != false
+               then
+                       eval_gettextln 'The copy of the patch that failed is found in:
+   $dotest/patch'
+               fi
                stop_here_user_resolve $this
        fi