summaryrefslogtreecommitdiff
path: root/t/t3900
diff options
context:
space:
mode:
authorLibravatar Andy Parkins <andyparkins@gmail.com>2007-09-28 15:17:45 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-09-29 20:31:59 -0700
commitd392e712a844e6ce029aa901902e08a3da82f89d (patch)
treec2219c7cfa68f80b8da8ee16bfcf3ea7cb5b9e98 /t/t3900
parentMake for-each-ref allow atom names like "<name>:<something>" (diff)
downloadtgif-d392e712a844e6ce029aa901902e08a3da82f89d.tar.xz
Make for-each-ref's grab_date() support per-atom formatting
grab_date() gets an extra parameter - atomname; this extra parameter is checked to see if it has a ":<format>" extra component in it, and if so that "<format>" string is passed to parse_date_format() to produce an enum date_mode value which is then further passed to show_date(). In short it allows the user of git-for-each-ref to do things like this: $ git-for-each-ref --format='%(taggerdate:default)' refs/tags/v1.5.2 Sun May 20 00:30:42 2007 -0700 $ git-for-each-ref --format='%(taggerdate:relative)' refs/tags/v1.5.2 4 months ago $ git-for-each-ref --format='%(taggerdate:short)' refs/tags/v1.5.2 2007-05-20 $ git-for-each-ref --format='%(taggerdate:local)' refs/tags/v1.5.2 Sun May 20 08:30:42 2007 $ git-for-each-ref --format='%(taggerdate:iso8601)' refs/tags/v1.5.2 2007-05-20 00:30:42 -0700 $ git-for-each-ref --format='%(taggerdate:rfc2822)' refs/tags/v1.5.2 Sun, 20 May 2007 00:30:42 -0700 The default, when no ":<format>" is specified is ":default", leaving the existing behaviour unchanged. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3900')
0 files changed, 0 insertions, 0 deletions