author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 09:40:21 +0000 (04:40 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 09:40:21 +0000 (04:40 -0500) | ||
commit | 59885273c337df937430b8731633c2e9020ce8e3 | |
tree | edcb71f9c1af3315e53bdd173ce7e01bb3d176c6 | tree | snapshot |
parent | 51a989ba5a4d1299d08ddad19c6a45485bdb7dd8 | commit | diff |
git-gui: Handle commit encoding better.
Git prefers that all log messages are encoding in UTF-8. So now when
git-gui generates the commit message it converts the commit message
text from the internal Tcl Unicode representation into a UTF-8 file.
The file is then fed as stdin to git-commit-tree. I had to start
using a file here rather than feeding the message in with << as
<< uses the system encoding, which we may not want.
When we reload a commit message via git-cat-file we are getting the
raw byte stream, with no encoding performed by Git itself. So unless
the new 'encoding' header appears in the message we should probably
assume it is utf-8 encoded; but if the header is present we need to
use whatever it claims.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Git prefers that all log messages are encoding in UTF-8. So now when
git-gui generates the commit message it converts the commit message
text from the internal Tcl Unicode representation into a UTF-8 file.
The file is then fed as stdin to git-commit-tree. I had to start
using a file here rather than feeding the message in with << as
<< uses the system encoding, which we may not want.
When we reload a commit message via git-cat-file we are getting the
raw byte stream, with no encoding performed by Git itself. So unless
the new 'encoding' header appears in the message we should probably
assume it is utf-8 encoded; but if the header is present we need to
use whatever it claims.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |