git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Kumria <wildfire@progsoc.org>
To: git@vger.kernel.org
Cc: Anand Kumria <wildfire@progsoc.org>
Subject: [PATCH] gitk: Display the date of a tag in a human friendly way.
Date: Fri,  4 Jan 2013 15:47:11 +0000	[thread overview]
Message-ID: <1357314431-32710-1-git-send-email-wildfire@progsoc.org> (raw)

By selecting a tag within gitk you can display information about it.
This information is output by using the command

 'git cat-file tag <tagid>'

This outputs the *raw* information from the tag, amongst which is the
time - in seconds since the epoch. As useful as that value is, I find it
a lot easier to read and process time which it is something like:

 "Mon Dec 31 14:26:11 2012 -0800"

This change will modify the display of tags in gitk like so:

  @@ -1,7 +1,7 @@
   object 5d417842efeafb6e109db7574196901c4e95d273
   type commit
   tag v1.8.1
  -tagger Junio C Hamano <gitster@pobox.com> 1356992771 -0800
  +tagger Junio C Hamano <gitster@pobox.com> Mon Dec 31 14:26:11 2012 -0800

   Git 1.8.1
   -----BEGIN PGP SIGNATURE-----

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
---
 gitk-git/gitk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index d93bd99..aae1c58 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -10675,7 +10675,7 @@ proc showtag {tag isnew} {
     set linknum 0
     if {![info exists cached_tagcontent($tag)]} {
 	catch {
-           set cached_tagcontent($tag) [exec git cat-file tag $tag]
+           set cached_tagcontent($tag) [exec git cat-file -p $tag]
 	}
     }
     if {[info exists cached_tagcontent($tag)]} {
-- 
1.7.9.5

             reply	other threads:[~2013-01-04 23:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 15:47 Anand Kumria [this message]
2013-01-04 23:50 ` [PATCH] gitk: Display the date of a tag in a human friendly way Junio C Hamano
2013-01-05 14:05   ` Anand Kumria
2013-01-05 19:38     ` Junio C Hamano
2013-02-03 18:37       ` Anand Kumria
2013-02-03 20:12         ` Jonathan Nieder
2013-02-03 20:23           ` Junio C Hamano
2013-04-01  7:25         ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357314431-32710-1-git-send-email-wildfire@progsoc.org \
    --to=wildfire@progsoc.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).