@matheusbsbs / matheus-bagliano / commits / 76486bbefb
Fork 0

git-gui: Format author/committer times in ISO format

This is a simple change to match what gitk does when it shows a commit; we format using ISO dates (yyyy-mm-dd HH:MM:SS). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed May 9, 2007 at 00:48 UTC 76486bbefbaeb606f662dadde0ca5dac59a4ec31
1 file changed +10 -4
lib/blame.tcl
+10 -4
@@ -347,14 +347,20 @@ method _showcommit {lno} {
347 set author_time {}
348 catch {set author_name $header($cmit,author)}
349 catch {set author_email $header($cmit,author-mail)}
350 - catch {set author_time [clock format $header($cmit,author-time)]}
350 + catch {set author_time [clock format \
351 + $header($cmit,author-time) \
352 + -format {%Y-%m-%d %H:%M:%S}
353 + ]}
354
355 set committer_name {}
356 set committer_email {}
357 set committer_time {}
358 catch {set committer_name $header($cmit,committer)}
359 catch {set committer_email $header($cmit,committer-mail)}
357 - catch {set committer_time [clock format $header($cmit,committer-time)]}
360 + catch {set committer_time [clock format \
361 + $header($cmit,committer-time) \
362 + -format {%Y-%m-%d %H:%M:%S}
363 + ]}
364
365 if {[catch {set msg $header($cmit,message)}]} {
366 set msg {}
@@ -383,8 +389,8 @@ method _showcommit {lno} {
389 }
390
391 $w_cmit insert end "commit $cmit
386 -Author: $author_name $author_email $author_time
387 -Committer: $committer_name $committer_email $committer_time
392 +Author: $author_name $author_email $author_time
393 +Committer: $committer_name $committer_email $committer_time
394 Original File: [escape_path $line_file($lno)]
395
396 $msg"