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

Re: [RFD] use approxidate for "git commit --date=xyz"?

From
Peter Krefting <peter@softwolves.pp.se>
Date
May 7, 2014, 07:22 UTC
Message-ID
<alpine.DEB.2.00.1405070817580.15517@ds9.cixit.se>
In-Reply-To
<xmqq1tweec1o.fsf@gitster.dls.corp.google.com>
Junio C Hamano:
> But why does the workflow need --date=now in the first place?

I tend to do this quite a lot, after fixing up a commit using rebase, I notice that the commit date is when I first started fixing the issue, even if that was a week or so ago. I then like to reset the commit date to reflect when I actually was done with it, and try "commit --amend --date=now".

I just haven't been annoyed enough to patch the code to fix it (so the git repository at my $dayjob does have a number of commits with the "wrong" commit time in it [1]), but I would welcome such an addition.

-- 
\\// Peter - http://www.softwolves.pp.se/

  [1] The last such is one that took me about a week to implement:
       AuthorDate: 2014-04-15 15:48:38 +0200
       CommitDate: 2014-04-22 09:23:25 +0100
      it'd look better to have the AuthorDate at the 22nd as well, imho.
Previous: Jeff King
Message 9 of 9 in “[RFD] use approxidate for "git commit --date=xyz"?”
  1. Linus TorvaldsApr 30, 2014
  2. Junio C HamanoApr 30, 2014
  3. Jeff KingMay 1, 2014
  4. 0/4 approxidate for "git commit --date=foo"Jeff King, May 2, 2014
  5. 1/4 commit: use split_ident_line to compare author/committerJeff King, May 2, 2014
  6. 2/4 pretty: make show_ident_date publicJeff King, May 2, 2014
  7. 3/4 commit: print "Date" line when the user has set dateJeff King, May 2, 2014
  8. 4/4 commit: accept more date formats for "--date"Jeff King, May 2, 2014
  9. Peter KreftingMay 7, 2014

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.