diff options
author | Anders Kaseorg <andersk@MIT.EDU> | 2011-01-19 14:47:25 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2011-05-29 14:46:16 +1000 |
commit | f5974d97af06bca1382c585a515c8e1920333eb7 (patch) | |
tree | 456d6e402116459832c596ce9d2b11901eb352af /gitk | |
parent | gitk: Remove unused $cdate array (diff) | |
download | tgif-f5974d97af06bca1382c585a515c8e1920333eb7.tar.xz |
gitk: Remember time zones from author and commit timestamps
When resolving a conflicted cherry-pick, this lets us pass
GIT_AUTHOR_DATE to git citool with the correct timezone.
It does this by making elements 2 and 4 of the commitinfo array
entries, which store the author and committer dates of the commit,
be 2-element lists storing the numerical date and timezone offset,
rather than just the numerical date.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-x | gitk | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -659,7 +659,7 @@ proc newvarc {view id} { if {![info exists commitinfo($id)]} { parsecommit $id $commitdata($id) 1 } - set cdate [lindex $commitinfo($id) 4] + set cdate [lindex [lindex $commitinfo($id) 4] 0] if {![string is integer -strict $cdate]} { set cdate 0 } @@ -1641,10 +1641,10 @@ proc parsecommit {id contents listed} { set line [split $line " "] set tag [lindex $line 0] if {$tag == "author"} { - set audate [lindex $line end-1] + set audate [lrange $line end-1 end] set auname [join [lrange $line 1 end-2] " "] } elseif {$tag == "committer"} { - set comdate [lindex $line end-1] + set comdate [lrange $line end-1 end] set comname [join [lrange $line 1 end-2] " "] } } @@ -11021,7 +11021,7 @@ proc prefsok {} { proc formatdate {d} { global datetimeformat if {$d ne {}} { - set d [clock format $d -format $datetimeformat] + set d [clock format [lindex $d 0] -format $datetimeformat] } return $d } |