Thread (10 messages) 10 messages, 4 authors, 2016-06-15

[PATCH 2/3] gitk: Remember time zones from author and commit timestamps

flat view
STALE3777d

From: Anders Kaseorg <hidden>
Date: 2016-06-15 22:50:26
Subsystem: the rest · Maintainer: Linus Torvalds

When resolving a conflicted cherry-pick, this lets us pass
GIT_AUTHOR_DATE to git citool with the correct timezone.

Signed-off-by: Anders Kaseorg <redacted>
---
 gitk |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gitk b/gitk
index bf68959..5c6058a 100755
--- a/gitk
+++ b/gitk
@@ -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] " "]
 	}
     }
@@ -11018,7 +11018,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
 }
-- 
1.7.4.rc1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help