aboutsummaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorArjen Laarhoven <arjen@yaph.org>2007-08-14 22:02:04 +0200
committerPaul Mackerras <paulus@samba.org>2007-08-15 10:15:53 +1000
commite8b5f4be708a73fd8b6c06a782168d5b04e3e5c1 (patch)
tree5586e0d37af51d412d7c7c7c75c003eb85edd5ee /gitk
parent890fae7041bb0607f386ac1a996a49530f1cd86f (diff)
downloadgit-e8b5f4be708a73fd8b6c06a782168d5b04e3e5c1.tar.gz
git-e8b5f4be708a73fd8b6c06a782168d5b04e3e5c1.tar.xz
[PATCH] 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 <arjen@yaph.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitk b/gitk
index 15e4a94eb..aa8baf857 100755
--- a/gitk
+++ b/gitk
@@ -1012,7 +1012,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 diffcontext selectbgcolor
if {$stuffsaved} return
@@ -1030,6 +1030,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]
@@ -7341,8 +7342,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
}
@@ -7655,6 +7657,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