git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] --utf8 is now default for 'git-am'
@ 2007-01-08 21:59 Junio C Hamano
  2007-01-09  8:28 ` Johannes Sixt
  0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2007-01-08 21:59 UTC (permalink / raw)
  To: git

Since we are talking about allowing potentially incompatible UI
changes in v1.5.0 iff the change improves the general situation,
I would say why not.

There is --no-utf8 flag to avoid re-coding from botching the log
message just in case, but we may not even need it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 Documentation/git-am.txt |   19 ++++++++++++++++---
 git-am.sh                |    8 +++++---
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 910457d..53e81cb 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -9,7 +9,7 @@ git-am - Apply a series of patches in a mailbox
 SYNOPSIS
 --------
 [verse]
-'git-am' [--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way]
+'git-am' [--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]
          [--interactive] [--whitespace=<option>] <mbox>...
 'git-am' [--skip | --resolved]
 
@@ -29,8 +29,21 @@ OPTIONS
 	Instead of `.dotest` directory, use <dir> as a working
 	area to store extracted patches.
 
---utf8, --keep::
-	Pass `-u` and `-k` flags to `git-mailinfo` (see
+--keep::
+	Pass `-k` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).
+
+--utf8::
+	Pass `-u` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).
+	The proposed commit log message taken from the e-mail
+	are re-coded into UTF-8 encoding (configuration variable
+	`i18n.commitencoding` can be used to specify project's
+	preferred encoding if it is not UTF-8).
++
+This was optional in prior versions of git, but now it is the
+default.   You could use `--no-utf8` to override this.
+
+--no-utf8::
+	Do not pass `-u` flag to `git-mailinfo` (see
 	gitlink:git-mailinfo[1]).
 
 --binary::
diff --git a/git-am.sh b/git-am.sh
index 7c0bb60..d9eb79d 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -2,7 +2,7 @@
 #
 # Copyright (c) 2005, 2006 Junio C Hamano
 
-USAGE='[--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way]
+USAGE='[--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]
   [--interactive] [--whitespace=<option>] <mbox>...
   or, when resuming [--skip | --resolved]'
 . git-sh-setup
@@ -105,7 +105,7 @@ It does not apply to blobs recorded in its index."
 }
 
 prec=4
-dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg=
+dotest=.dotest sign= utf8=t keep= skip= interactive= resolved= binary= ws= resolvemsg=
 
 while case "$#" in 0) break;; esac
 do
@@ -128,7 +128,9 @@ do
 	-s|--s|--si|--sig|--sign|--signo|--signof|--signoff)
 	sign=t; shift ;;
 	-u|--u|--ut|--utf|--utf8)
-	utf8=t; shift ;;
+	shift ;; # this is now default
+	--no-u|--no-ut|--no-utf|--no-utf8)
+	utf8=; shift ;;
 	-k|--k|--ke|--kee|--keep)
 	keep=t; shift ;;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-09  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-08 21:59 [PATCH] --utf8 is now default for 'git-am' Junio C Hamano
2007-01-09  8:28 ` Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).