gitk: Make the date/time display configurable
PATCH 1/1 gitk: Make the date/time display configurable
The new 'datetimeformat' configuration variable in ~/.gitk can be set to a Tcl 'clock format' format string to modify the display of dates and times.
http://www.tcl.tk/man/tcl8.4/TclCmd/clock.htm has a list of allowed fields.
Signed-off-by Arjen Laarhoven <[email protected]>
--- gitk | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
gitk +5 -2
@@ -967,7 +967,7 @@ proc savestuff {w} { global stuffsaved findmergefiles maxgraphpct global maxwidth showneartags showlocalchanges global viewname viewfiles viewargs viewperm nextviewnum - global cmitmode wrapcomment + global cmitmode wrapcomment datetimeformat global colors bgcolor fgcolor diffcolors selectbgcolor if {$stuffsaved} return
@@ -985,6 +985,7 @@ proc savestuff {w} { puts $f [list set wrapcomment $wrapcomment] puts $f [list set showneartags $showneartags] puts $f [list set showlocalchanges $showlocalchanges] + puts $f [list set datetimeformat $datetimeformat] puts $f [list set bgcolor $bgcolor] puts $f [list set fgcolor $fgcolor] puts $f [list set colors $colors]
@@ -7249,8 +7250,9 @@ proc prefsok {} { } proc formatdate {d} { + global datetimeformat if {$d ne {}} { - set d [clock format $d -format "%Y-%m-%d %H:%M:%S"] + set d [clock format $d -format $datetimeformat] } return $d }
@@ -7563,6 +7565,7 @@ set showneartags 1 set maxrefs 20 set maxlinelen 200 set showlocalchanges 1 +set datetimeformat "%Y-%m-%d %H:%M:%S" set colors {green red blue magenta darkgrey brown orange} set bgcolor white
Signature · 1 line
1.5.3.rc4.67.gf9286