git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chinmoy via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Chinmoy <chinmoy12c@gmail.com>,
	Chinmoy Chakraborty <chinmoy12c@gmail.com>
Subject: [PATCH] Documentation: updated documentation for git commit --date
Date: Sun, 28 Mar 2021 10:19:49 +0000	[thread overview]
Message-ID: <pull.918.git.1616926790227.gitgitgadget@gmail.com> (raw)

From: Chinmoy Chakraborty <chinmoy12c@gmail.com>

This commit lists the special strings used with `--date`
in `git-commit.txt` and also a brief explanation about
the strings in `date-formats.txt`.

Signed-off-by: Chinmoy Chakraborty <chinmoy12c@gmail.com>
---
    Documentation: updated documentation for git commit --date
    
    This commit lists the special strings used with --date in git-commit.txt
    and also a brief explanation about the strings in date-formats.txt.
    
    Signed-off-by: Chinmoy Chakraborty chinmoy12c@gmail.com
    
    
    Related Issue
    =============
    
    #302

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-918%2Fchinmoy12c%2Fissue_302-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-918/chinmoy12c/issue_302-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/918

 Documentation/date-formats.txt | 32 ++++++++++++++++++++++++++++++++
 Documentation/git-commit.txt   |  5 ++++-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt
index 99c455f51c04..66dae179eb66 100644
--- a/Documentation/date-formats.txt
+++ b/Documentation/date-formats.txt
@@ -1,6 +1,38 @@
+[[DATE FORMATS]]
 DATE FORMATS
 ------------
 
+`yesterday`::
+	Change commit time to yesterday, that is, 24 hours ago.
+
+`noon`::
+	Change commit time to noon, that is 12:00. If current
+	time is less than 12:00, the time will be set to 12:00
+	on the previous day, else it will be set to 12:00 on
+	the same day.
+
+`midnight`::
+	Change commit time to midnight, that is, 00:00.
+
+`tea`::
+	Change commit time to 17:00(tea time). If the current
+	time is less than 17:00, the time will be set to 17:00
+	on the previous day, else it will be set to 17:00 on
+	the same day.
+
+`PM`::
+	Change commit time from AM to PM. If the current time
+	is already greater than 12:00, then the time remains
+	unaltered.
+
+`AM`::
+	Change commit time from PM to AM. If current time is
+	already less than 12:00, then the time remains
+	unaltered.
+
+`now`::
+	Change commit time to current time.
+
 The `GIT_AUTHOR_DATE` and `GIT_COMMITTER_DATE` environment variables
 support the following date formats:
 
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 3c69f461c9af..b2f51cdcafaf 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -176,7 +176,10 @@ See linkgit:git-rebase[1] for details.
 	the commit author is then copied from the first such commit found.
 
 --date=<date>::
-	Override the author date used in the commit.
+	Override the author date used in the commit. The value of <date>
+	may be any one of the following special values - "yesterday",
+	"noon", "midnight", "tea", "PM", "AM", "never", "now"
+	(see <<DATE FORMATS>>).
 
 -m <msg>::
 --message=<msg>::

base-commit: 84d06cdc06389ae7c462434cb7b1db0980f63860
-- 
gitgitgadget

             reply	other threads:[~2021-03-28 10:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28 10:19 Chinmoy via GitGitGadget [this message]
2021-03-28 12:54 ` [PATCH v2] " Chinmoy via GitGitGadget
2021-03-29  5:25   ` Bagas Sanjaya
2021-03-29  6:02     ` Chinmoy Chakraborty
2021-03-29 11:11       ` Bagas Sanjaya
2021-03-29 14:56         ` Chinmoy Chakraborty
2021-03-29 21:27   ` Junio C Hamano
2021-03-30 16:38     ` Chinmoy Chakraborty
2021-03-30 17:28       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.918.git.1616926790227.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=chinmoy12c@gmail.com \
    --cc=git@vger.kernel.org \
    --subject='Re: [PATCH] Documentation: updated documentation for git commit --date' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox