diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2008-09-18 01:07:32 +0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-24 12:48:32 -0700 |
commit | 72e6b002021e45255f568fc0c885d82de75ae935 (patch) | |
tree | fb76f3bbe6e8006a6aca0ee59d6a2f1b51247904 /git-gui.sh | |
parent | git-gui: Assume `blame --incremental` output is in UTF-8 (diff) | |
download | tgif-72e6b002021e45255f568fc0c885d82de75ae935.tar.xz |
git-gui: Cleanup handling of the default encoding.
- Make diffs and blame default to the system (locale)
encoding instead of hard-coding UTF-8.
- Add a gui.encoding option to allow overriding it.
- gitattributes still have the final word.
The rationale for this is Windows support:
1) Windows people are accustomed to using legacy encodings
for text files. For many of them defaulting to utf-8
will be counter-intuitive.
2) Windows doesn't support utf-8 locales, and switching
the system encoding is a real pain. Thus the option.
This patch also adds proper encoding conversion to Apply Hunk/Line.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-x | git-gui.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh index 4a762355d6..b37148b7b2 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -678,6 +678,7 @@ set default_config(merge.verbosity) 2 set default_config(user.name) {} set default_config(user.email) {} +set default_config(gui.encoding) [encoding system] set default_config(gui.matchtrackingbranch) false set default_config(gui.pruneduringfetch) false set default_config(gui.trustmtime) false |