All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] for-each-ref: document `creatordate` and `creator` fields
@ 2016-01-05  3:51 Eric Wong
  2016-01-05 17:43 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2016-01-05  3:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

These were introduced back in 2006 at 3175aa1ec28c but
never documented.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 And I just found these very useful, today!

 I also noticed creator{name,email} aren't supported, yet.
 Perhaps they're worth implementing for consistency.

 Documentation/git-for-each-ref.txt | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index c6f073c..06208c4 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -142,6 +142,11 @@ In addition to the above, for commit and tag objects, the header
 field names (`tree`, `parent`, `object`, `type`, and `tag`) can
 be used to specify the value in the header field.
 
+For commit and tag objects, the special `creatordate` and `creator`
+fields will correspond to the appropriate date or name-email-date tuple
+from the `committer` or `tagger` fields depending on the object type.
+These are intended for working on a mix of annotated and lightweight tags.
+
 Fields that have name-email-date tuple as its value (`author`,
 `committer`, and `tagger`) can be suffixed with `name`, `email`,
 and `date` to extract the named component.
@@ -153,8 +158,8 @@ line is 'contents:body', where body is all of the lines after the first
 blank line.  The optional GPG signature is `contents:signature`.  The
 first `N` lines of the message is obtained using `contents:lines=N`.
 
-For sorting purposes, fields with numeric values sort in numeric
-order (`objectsize`, `authordate`, `committerdate`, `taggerdate`).
+For sorting purposes, fields with numeric values sort in numeric order
+(`objectsize`, `authordate`, `committerdate`, `creatordate`, `taggerdate`).
 All other fields are used to sort in their byte-value order.
 
 There is also an option to sort by versions, this can be done by using
-- 
EW

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] for-each-ref: document `creatordate` and `creator` fields
  2016-01-05  3:51 [PATCH] for-each-ref: document `creatordate` and `creator` fields Eric Wong
@ 2016-01-05 17:43 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2016-01-05 17:43 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Eric Wong <normalperson@yhbt.net> writes:

> These were introduced back in 2006 at 3175aa1ec28c but
> never documented.

Thanks, and I totally forgot about the feature ;-)

> Signed-off-by: Eric Wong <normalperson@yhbt.net>
> ---
>  And I just found these very useful, today!
>
>  I also noticed creator{name,email} aren't supported, yet.
>  Perhaps they're worth implementing for consistency.
>
>  Documentation/git-for-each-ref.txt | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
> index c6f073c..06208c4 100644
> --- a/Documentation/git-for-each-ref.txt
> +++ b/Documentation/git-for-each-ref.txt
> @@ -142,6 +142,11 @@ In addition to the above, for commit and tag objects, the header
>  field names (`tree`, `parent`, `object`, `type`, and `tag`) can
>  be used to specify the value in the header field.
>  
> +For commit and tag objects, the special `creatordate` and `creator`
> +fields will correspond to the appropriate date or name-email-date tuple
> +from the `committer` or `tagger` fields depending on the object type.
> +These are intended for working on a mix of annotated and lightweight tags.
> +
>  Fields that have name-email-date tuple as its value (`author`,
>  `committer`, and `tagger`) can be suffixed with `name`, `email`,
>  and `date` to extract the named component.
> @@ -153,8 +158,8 @@ line is 'contents:body', where body is all of the lines after the first
>  blank line.  The optional GPG signature is `contents:signature`.  The
>  first `N` lines of the message is obtained using `contents:lines=N`.
>  
> -For sorting purposes, fields with numeric values sort in numeric
> -order (`objectsize`, `authordate`, `committerdate`, `taggerdate`).
> +For sorting purposes, fields with numeric values sort in numeric order
> +(`objectsize`, `authordate`, `committerdate`, `creatordate`, `taggerdate`).
>  All other fields are used to sort in their byte-value order.
>  
>  There is also an option to sort by versions, this can be done by using

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-05 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05  3:51 [PATCH] for-each-ref: document `creatordate` and `creator` fields Eric Wong
2016-01-05 17:43 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.