]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-am.sh
Merge branch 'master' of git://repo.or.cz/git/fastimport
[git.git] / git-am.sh
index d9eb79d1aa8dccf18fa0df89abdc5d3fdfd2aa24..1252f26bbd46484f25e58e92680e553f7fd7c1da 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -7,6 +7,7 @@ USAGE='[--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]
   or, when resuming [--skip | --resolved]'
 . git-sh-setup
 set_reflog_action am
+require_work_tree
 
 git var GIT_COMMITTER_IDENT >/dev/null || exit
 
@@ -128,7 +129,7 @@ do
        -s|--s|--si|--sig|--sign|--signo|--signof|--signoff)
        sign=t; shift ;;
        -u|--u|--ut|--utf|--utf8)
-       shift ;; # this is now default
+       utf8=t; shift ;; # this is now default
        --no-u|--no-ut|--no-utf|--no-utf8)
        utf8=; shift ;;
        -k|--k|--ke|--kee|--keep)
@@ -228,6 +229,8 @@ fi
 if test "$(cat "$dotest/utf8")" = t
 then
        utf8=-u
+else
+       utf8=-n
 fi
 if test "$(cat "$dotest/keep")" = t
 then