diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2008-09-18 01:07:34 +0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-24 12:48:32 -0700 |
commit | 3fe0162362f80262ed1965f19c1f57f298931c94 (patch) | |
tree | dab7c45bb8241268d946bb281d30f4384cbf7b46 /lib/diff.tcl | |
parent | 50102c5687db83db48b9705e07de16d07cef7cd9 (diff) | |
download | git-3fe0162362f80262ed1965f19c1f57f298931c94.tar.gz git-3fe0162362f80262ed1965f19c1f57f298931c94.tar.xz |
git-gui: Allow forcing display encoding for diffs using a submenu.
Add a submenu to allow dynamically changing the encoding to use
for diffs. Encoding settings are remembered while git-gui runs.
The rules are:
1) Encoding set for a specific file overrides gitattributes.
2) Last explicitly set value of the encoding overrides gui.encoding
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 'lib/diff.tcl')
-rw-r--r-- | lib/diff.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl index 8fefc5d9a..b61629676 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -40,6 +40,15 @@ proc reshow_diff {} { } } +proc force_diff_encoding {enc} { + global current_diff_path + + if {$current_diff_path ne {}} { + force_path_encoding $current_diff_path $enc + reshow_diff + } +} + proc handle_empty_diff {} { global current_diff_path file_states file_lists |