{"thread":{"id":"6288","subject":"[PATCH] --utf8 is now default for 'git-am'","startedAt":"2007-01-08T21:59:29Z","lastAt":"2007-01-09T08:28:51Z","messageCount":2,"participants":["Junio C Hamano","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"31165","messageId":"7vlkkduqm6.fsf@assigned-by-dhcp.cox.net","threadId":"6288","inReplyTo":null,"subject":"[PATCH] --utf8 is now default for 'git-am'","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-08T21:59:29Z","receivedAt":"2007-01-08T21:59:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Since we are talking about allowing potentially incompatible UI\nchanges in v1.5.0 iff the change improves the general situation,\nI would say why not.\n\nThere is --no-utf8 flag to avoid re-coding from botching the log\nmessage just in case, but we may not even need it.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n Documentation/git-am.txt |   19 ++++++++++++++++---\n git-am.sh                |    8 +++++---\n 2 files changed, 21 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-am.txt b/Documentation/git-am.txt\nindex 910457d..53e81cb 100644\n--- a/Documentation/git-am.txt\n+++ b/Documentation/git-am.txt\n@@ -9,7 +9,7 @@ git-am - Apply a series of patches in a mailbox\n SYNOPSIS\n --------\n [verse]\n-'git-am' [--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way]\n+'git-am' [--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]\n          [--interactive] [--whitespace=<option>] <mbox>...\n 'git-am' [--skip | --resolved]\n \n@@ -29,8 +29,21 @@ OPTIONS\n \tInstead of `.dotest` directory, use <dir> as a working\n \tarea to store extracted patches.\n \n---utf8, --keep::\n-\tPass `-u` and `-k` flags to `git-mailinfo` (see\n+--keep::\n+\tPass `-k` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).\n+\n+--utf8::\n+\tPass `-u` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).\n+\tThe proposed commit log message taken from the e-mail\n+\tare re-coded into UTF-8 encoding (configuration variable\n+\t`i18n.commitencoding` can be used to specify project's\n+\tpreferred encoding if it is not UTF-8).\n++\n+This was optional in prior versions of git, but now it is the\n+default.   You could use `--no-utf8` to override this.\n+\n+--no-utf8::\n+\tDo not pass `-u` flag to `git-mailinfo` (see\n \tgitlink:git-mailinfo[1]).\n \n --binary::\ndiff --git a/git-am.sh b/git-am.sh\nindex 7c0bb60..d9eb79d 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -2,7 +2,7 @@\n #\n # Copyright (c) 2005, 2006 Junio C Hamano\n \n-USAGE='[--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way]\n+USAGE='[--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]\n   [--interactive] [--whitespace=<option>] <mbox>...\n   or, when resuming [--skip | --resolved]'\n . git-sh-setup\n@@ -105,7 +105,7 @@ It does not apply to blobs recorded in its index.\"\n }\n \n prec=4\n-dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg=\n+dotest=.dotest sign= utf8=t keep= skip= interactive= resolved= binary= ws= resolvemsg=\n \n while case \"$#\" in 0) break;; esac\n do\n@@ -128,7 +128,9 @@ do\n \t-s|--s|--si|--sig|--sign|--signo|--signof|--signoff)\n \tsign=t; shift ;;\n \t-u|--u|--ut|--utf|--utf8)\n-\tutf8=t; shift ;;\n+\tshift ;; # this is now default\n+\t--no-u|--no-ut|--no-utf|--no-utf8)\n+\tutf8=; shift ;;\n \t-k|--k|--ke|--kee|--keep)\n \tkeep=t; shift ;;\n \n"},{"id":"31210","messageId":"45A35243.FB9FB121@eudaptics.com","threadId":"6288","inReplyTo":"7vlkkduqm6.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] --utf8 is now default for 'git-am'","fromName":"Johannes Sixt","fromEmail":"j.sixt@eudaptics.com","sentAt":"2007-01-09T08:28:51Z","receivedAt":"2007-01-09T08:28:51Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Junio C Hamano wrote:\n> @@ -128,7 +128,9 @@ do\n>         -s|--s|--si|--sig|--sign|--signo|--signof|--signoff)\n>         sign=t; shift ;;\n>         -u|--u|--ut|--utf|--utf8)\n> -       utf8=t; shift ;;\n> +       shift ;; # this is now default\n> +       --no-u|--no-ut|--no-utf|--no-utf8)\n> +       utf8=; shift ;;\n>         -k|--k|--ke|--kee|--keep)\n>         keep=t; shift ;;\n> \n\nHow is\n\n  git-am --no-utf8 --utf8 mbox\n\nto be interpreted? I'd expect that the last option on the command line\nhas precedence, for example, if git-am is used in a script like this:\n\n  git-am --no-utf8 $userpreferences $mbox\n\nWith you patch --no-utf8 always overrides any --utf8 that is specified.\n\n-- Hannes\n"}]}