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>
This commit is contained in:

committed by
Shawn O. Pearce

parent
50102c5687
commit
3fe0162362
@ -3010,6 +3010,14 @@ proc create_common_diff_popup {ctxm} {
|
||||
-command {incr_font_size font_diff 1}
|
||||
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
|
||||
$ctxm add separator
|
||||
set emenu $ctxm.enc
|
||||
menu $emenu
|
||||
build_encoding_menu $emenu [list force_diff_encoding]
|
||||
$ctxm add cascade \
|
||||
-label [mc "Encoding"] \
|
||||
-menu $emenu
|
||||
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
|
||||
$ctxm add separator
|
||||
$ctxm add command -label [mc "Options..."] \
|
||||
-command do_options
|
||||
}
|
||||
|
Reference in New Issue
Block a user