Thread (4 messages) flat view 4 messages, 2 authors, 2021-02-23

Re: [PATCH] doc: `--date` in `git-commit` accepts approxidates

From: Jeff King <hidden>
Date: 2021-02-23 18:12:35

On Tue, Feb 23, 2021 at 05:35:46PM +0000, Utku Gultopu via GitGitGadget wrote:
From: Utku Gultopu <redacted>

Document the fact that the `--date` option in `git-commit` accepts any
date format that is accepted by the `approxidate_careful` function,
which is located in `date.c`.
I agree it's worth documenting this a bit better, but...
    I guess this patch is not ideal, because instead of properly
    documenting, it refers the user to the code. However I wasn't able to
    find documentation about the "approxidates" which I can link to. Please
    let me know how I can improve it.
...yeah. I don't think the phrase "approxidate_careful" is really
meaningful to end users.

Perhaps we can leave this hunk intact:
+DATE FORMATS[[DATES]]
+---------------------
 
-The `GIT_AUTHOR_DATE`, `GIT_COMMITTER_DATE` environment variables
-ifdef::git-commit[]
-and the `--date` option
-endif::git-commit[]
+The `GIT_AUTHOR_DATE` and `GIT_COMMITTER_DATE` environment variables
 support the following date formats:
since it's true that --date does accept those formats.

And then at the end of that section, expand what it's willing to take:

ifdef::git-commit[]
The `--date` option (but not the environment variables) will also try to
make sense of other more human-centric date formats, including relative
dates like "yesterday" or "last Friday at noon".
endif::git-commit[]

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help