Alexey Nezhdanov <[EMAIL PROTECTED]> writes:
> But this should not be user's problem - it's just the UI that doesn't
> understands when transcoding should be done.
Yes, while you _could_ do something like this to feed text in
local encoding to the VISUAL/EDITOR, and convert it back to
@@ -84,7 +84,7 @@
if [ "$?" != "0" ]
- cat .editmsg
+ git-char-conv --utf8-to-user < .editmsg
@@ -93,7 +93,9 @@
-grep -v '^#' < .editmsg | git-stripspace > .cmitmsg
+grep -v '^#' < .editmsg |
+git-char-conv --user-to-utf8 > .cmitmsg
[ -s .cmitmsg ] &&
commit=$(cat .cmitmsg | git-commit-tree $tree $PARENTS) &&
I think it is a horrible way to do things.
I presume that your bringing up UTF-8 suggests that you believe
doing things in UTF-8 for interoperability's sake is the right
thing. If that is indeed the case, then tools other than GIT
and Cogito you would use would need to deal with this exact same
problem, that your VISUAL/EDITOR does not understand UTF-8.
How about writing a little wrapper, koi-vi, which would roughly
tcs -f utf -t koi8 "$1" >.tmp-koi
tcs -t utf -f koi8 .tmp-koi >"$1"
and point VISUAL/EDITOR environment variable at it? That way
your other tools would be able to let you keep using your
favorite editor, now utf8 enabled, and deal with UTF-8. None of
the scripts, including the script I quoted above, has to be
changed that way.
Having said that, I personally feel that the choice of the
character encoding of commit messages is per-project convention
issue and does not even warrant a per-project "configuration
file". As long as your developers all agree to use KOI, and you
are reasonably sure that you will not ever cross-merge with
another project that uses different encoding for commit
messages, I think it is perfectly fine to use KOI in your commit
messages. The core's job is only to ensure that we are 8-bit
clean and faithfully record whatever you throw at us.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html