diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-02-12 13:16:11 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-12 13:16:11 -0800 |
commit | d4833b22abc0093153534cfaa93bb90be9a708ca (patch) | |
tree | c28c84351594285fa8fe8ed054eb4aecac4c07c0 /Documentation | |
parent | b3370dd51edb7f087754f0090ab483e9d1a2161e (diff) | |
parent | 46176d77c9e0b219a78d64cb99d8dbf4d9bcde2d (diff) | |
download | git-d4833b22abc0093153534cfaa93bb90be9a708ca.tar.gz |
Merge branch 'vd/for-each-ref-sort-with-formatted-timestamp'
"git branch" and friends learned to use the formatted text as
sorting key, not the underlying timestamp value, when the --sort
option is used with author or committer timestamp with a format
specifier (e.g., "--sort=creatordate:format:%H:%M:%S").
* vd/for-each-ref-sort-with-formatted-timestamp:
ref-filter.c: sort formatted dates by byte value
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-for-each-ref.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index be9543f684..3a9ad91b7a 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -359,9 +359,11 @@ In any case, a field name that refers to a field inapplicable to the object referred by the ref does not cause an error. It returns an empty string instead. -As a special case for the date-type fields, you may specify a format for -the date by adding `:` followed by date format name (see the -values the `--date` option to linkgit:git-rev-list[1] takes). +As a special case for the date-type fields, you may specify a format for the +date by adding `:` followed by date format name (see the values the `--date` +option to linkgit:git-rev-list[1] takes). If this formatting is provided in +a `--sort` key, references will be sorted according to the byte-value of the +formatted string rather than the numeric value of the underlying timestamp. Some atoms like %(align) and %(if) always require a matching %(end). We call them "opening atoms" and sometimes denote them as %($open). |