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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> From: Utku Gultopu <ugultopu@xxxxxxxxx>
> 
> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux