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

Re: [PATCH] Set AUTHOR_DATE in git-tools

From
Greg KH <greg@kroah.com>
Date
Apr 27, 2005, 03:52 UTC
Message-ID
<20050427035206.GA27615@kroah.com>
In-Reply-To
<20050426184442.GA20536@kroah.com>
On Tue, Apr 26, 2005 at 11:44:42AM -0700, Greg KH wrote:
> On Thu, Apr 21, 2005 at 05:32:16PM +1000, David Woodhouse wrote:
> > Entirely untested.
> 
> Doesn't work :(
I take it back, it works just fine... 

My problem was that bk generates dates with a non-rfc compliant timezone string. And I was trying to apply patches exported from bk in plain text format (building a udev git tree...) The patch below to commit-tree.c fixes this issue, if anyone runs into this same issue (I wouldn't recommend it to be applied, as it's probably a one-off issue...)

thanks,

greg k-h -------------- Allow commit-tree to handle the bk date format.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/commit-tree.c	2005-04-25 22:08:49.000000000 -0700
+++ b/commit-tree.c	2005-04-26 20:46:37.000000000 -0700
@@ -204,6 +204,12 @@
 	else
 	       return;
 
+	/* Handle messed up bk dates */
+	if (p[3] == ':') {
+		p[3] = p[4];
+		p[4] = p[5];
+		p[5] = p[6];
+	}
 	if (!isdigit(p[1]) || !isdigit(p[2]) || !isdigit(p[3]) || !isdigit(p[4]))
 		return;
 
Previous: Greg KH
Message 3 of 3 in “Set AUTHOR_DATE in git-tools”
  1. Set AUTHOR_DATE in git-toolsDavid Woodhouse, Apr 21, 2005
  2. Greg KHApr 26, 2005
  3. Greg KHApr 27, 2005

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.