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

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

From
Jeff King <peff@peff.net>
Date
Feb 23, 2021, 18:11 UTC
Message-ID
<YDVFaTGnPCfuJQSa@coredump.intra.peff.net>
In-Reply-To
<pull.969.git.git.1614101746491.gitgitgadget@gmail.com>
On Tue, Feb 23, 2021 at 05:35:46PM +0000, Utku Gultopu via GitGitGadget wrote:
Show 5 quoted lines
> From: Utku Gultopu <ugultopu@gmail.com>
> 
> 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:
Show 9 quoted lines
> +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
Previous: Utku Gultopu via GitGitGadgetNext: Junio C Hamano
Message 2 of 9 in “doc: `--date` in `git-commit` accepts approxidates”
  1. doc: `--date` in `git-commit` accepts approxidatesUtku Gultopu via GitGitGadget, Feb 23, 2021
  2. Jeff KingFeb 23, 2021
  3. Junio C HamanoFeb 23, 2021
  4. doc: `--date` in `git-commit` accepts approxidatesUtku Gultopu via GitGitGadget, Feb 23, 2021
  5. Jeff KingFeb 23, 2021
  6. Junio C HamanoFeb 23, 2021
  7. UtkuFeb 23, 2021
  8. Jeff KingFeb 23, 2021
  9. UtkuFeb 23, 2021

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.