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

Re: strange date generated by git-format-patch

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 24, 2007, 23:19 UTC
Message-ID
<Pine.LNX.4.63.0702250010080.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vodnjzyvq.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 24 Feb 2007, Junio C Hamano wrote:
Show 21 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> That is just a fake random date to make the Unix-From line 
> >> recognizable by common MUA and does not have anything to do with your 
> >> commit objects.
> >
> > So how about this:
> 
> > @@ -174,7 +174,7 @@ void show_log(struct rev_info *opt, const char *sep)
> >  		else
> >  			subject = "Subject: ";
> >  
> > -		printf("From %s Mon Sep 17 00:00:00 2001\n", sha1);
> > +		printf("From %s %s\n", sha1, show_date(time(NULL), 0, 0));
> 
> I actually once tried to change it to git's birthday (Thu Apr 7
> 15:13:13 2005 -0700) and I recall that it turned out that some
> people's scripts (or perhaps MUA) were broken and cared what was
> before "7" (nothing, as show_date() does, " " to align to two
> columns per date, "0" to zero-pad align) on the Unix-From line
> and discarded that update.

I only found out now (after some Googling, instigated by your reply) that the mbox format is _borked_. There seem to be so many variants, and I erroneously assumed that if it works in pine, it works everywhere...

> I do not think it is worth changing it.  Who's hurting with the
> current behaviour?  In other words, is it broken?

You can order by arrived-date. But that is such a minor issue that I agree nothing needs to be changed.

Ciao, Dscho

Previous: Jeff King
Message 7 of 7 in “strange date generated by git-format-patch”
  1. johan defriesFeb 23, 2007
  2. Junio C HamanoFeb 23, 2007
  3. Johannes SchindelinFeb 23, 2007
  4. Junio C HamanoFeb 24, 2007
  5. Theodore TsoFeb 24, 2007
  6. Jeff KingFeb 24, 2007
  7. Johannes SchindelinFeb 24, 2007

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.