git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitk: Display the date of a tag in a human friendly way.

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2013, 23:50 UTC
Message-ID
<7vhamwse2c.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1357314431-32710-1-git-send-email-wildfire@progsoc.org>
Anand Kumria <wildfire@progsoc.org> writes:
Show 25 quoted lines
> 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>
> ---

Sounds like a sensible thing to do but I didn't check how else (other than purely for displaying) this string is used.

Paul, the patch is not made against your tree, so if you choose to take it you would need to strip the leading directory at the top.

Thanks.

PS. I haven't received a pull request from you for a while; are there accumulated changes I should be pulling in before -rc0 of the next release we are working on?

Show 16 quoted lines
>  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)]} {
Previous: Anand KumriaNext: Anand Kumria
Message 2 of 8 in “gitk: Display the date of a tag in a human friendly way.”
  1. gitk: Display the date of a tag in a human friendly way.Anand Kumria, Jan 4, 2013
  2. Junio C HamanoJan 4, 2013
  3. Anand KumriaJan 5, 2013
  4. Junio C HamanoJan 5, 2013
  5. Anand KumriaFeb 3, 2013
  6. Jonathan NiederFeb 3, 2013
  7. Junio C HamanoFeb 3, 2013
  8. Paul MackerrasApr 1, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.