git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Trying to use AUTHOR_DATE
@ 2005-04-29 23:14 tony.luck
  2005-04-29 23:35 ` H. Peter Anvin
  0 siblings, 1 reply; 38+ messages in thread
From: tony.luck @ 2005-04-29 23:14 UTC (permalink / raw)
  To: git

I'm using cogito-0.8 (036bb73c6dd1871101ca19557298684ab9832f81) and trying
to set AUTHOR_DATE based on the "Date:" from the patch e-mail.  But, it
appears that commit-tree is munging this based on my timezone.

Here's what I set in the environment before invoking cg-commit:

  AUTHOR_DATE="29 Apr 2005 02:02:00 -0700"

and here's what cg-log reports on the "author" line:

  Fri, 29 Apr 2005 10:02:00 -0700

My /etc/localtime is set for "US/Pacific" ... which is where the 8 hours
comes from (I think).  If I set "TZ=GMT0BST" as well in the environment of
cg-commit to override /etc/localtime, then the author time comes out ok,
but then the "committer" time gets messed up.

-Tony

^ permalink raw reply	[flat|nested] 38+ messages in thread
* RE: Trying to use AUTHOR_DATE
@ 2005-04-30  3:44 Luck, Tony
  2005-04-30  3:49 ` H. Peter Anvin
  2005-04-30  4:50 ` Edgar Toernig
  0 siblings, 2 replies; 38+ messages in thread
From: Luck, Tony @ 2005-04-30  3:44 UTC (permalink / raw)
  To: Edgar Toernig; +Cc: H. Peter Anvin, git

>Another dependency :-(   I can live without http-pull but not
>without commit-tree.

Yes, the extra dependency sucks ... libcurl is missing from one of
the systems that I'd like to use GIT on ... so I'd prefer a solution
that doesn't involve libcurl.

>What's wrong with the patch I sent to fix this:
>
>	http://marc.theaimsgroup.com/?m=111446501003389
>

I missed it ... there is a problem that you drop the timezone.  When I
used this patch, I ended up with a commit that said:

author Keith Owens <kaos@sgi.com> 1114239900
committer Tony Luck <tony.luck@intel.com> 1114832076 -0700

See the missing timezone on the author line :-)  This is most upsetting
to cg-log.  It prints "expr: syntax error" and then

author Keith Owens <kaos@sgi.com> Thu, 01 Jan 1970 00:00:01

>> +	/* find the timezone at the end */
>> +	p = date + strlen(date);
>> +	while (p > date && isdigit(*--p))
>> +		;
>> +	if ((*p == '+' || *p == '-') && strlen(p) == 5)
>> +		snprintf(result, maxlen, "%lu %5.5s", then, p);
>
>This will choke on dates from Linus which have a trailing comment:
>
>	Date: Fri, 29 Apr 2005 15:26:14 -0700 (PDT)

You are right ... that's what comes from only looking at one e-mail
message to determine that pattern to match :-)

I'd much rather see your version fixed up to preserve the timezone
than have the libcurl dependency.

-Tony

^ permalink raw reply	[flat|nested] 38+ messages in thread
* RE: Trying to use AUTHOR_DATE
@ 2005-04-30  5:28 Luck, Tony
  2005-04-30 23:14 ` H. Peter Anvin
  0 siblings, 1 reply; 38+ messages in thread
From: Luck, Tony @ 2005-04-30  5:28 UTC (permalink / raw)
  To: Edgar Toernig; +Cc: H. Peter Anvin, git

>Fixed version below.

Yup ... that fixes it for my initial test cases.  Thanks.

-Tony

P.S. The libcurl that I found (curl-7.12.1-3.src.rpm) has curl_getdate()
implemented as >1000 lines of yacc.  Which seems like overkill (unless
I really need to set AUTHOR_DATE="a week ago last tuesday" :-)

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2005-05-03  0:36 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-29 23:14 Trying to use AUTHOR_DATE tony.luck
2005-04-29 23:35 ` H. Peter Anvin
2005-04-30  0:21   ` tony.luck
2005-04-30  3:23     ` Edgar Toernig
2005-04-30  3:47       ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2005-04-30  3:44 Luck, Tony
2005-04-30  3:49 ` H. Peter Anvin
2005-04-30  4:02   ` Linus Torvalds
2005-04-30  4:22     ` Linus Torvalds
2005-04-30  4:32       ` Russ Allbery
2005-04-30  8:02         ` David Woodhouse
2005-04-30 10:40           ` Edgar Toernig
2005-04-30 18:10             ` Russ Allbery
2005-04-30 20:32               ` Linus Torvalds
2005-04-30 21:59                 ` Juliusz Chroboczek
2005-04-30 22:54                 ` Edgar Toernig
2005-04-30 23:18                   ` Linus Torvalds
2005-05-01 16:46                   ` Linus Torvalds
2005-05-01 16:57                     ` Randy.Dunlap
2005-05-01 17:23                     ` Edgar Toernig
2005-04-30  5:43       ` Junio C Hamano
2005-04-30 10:53       ` Edgar Toernig
2005-04-30 11:13         ` David Woodhouse
2005-04-30 12:08           ` Kay Sievers
2005-04-30 12:13             ` David Woodhouse
2005-04-30 12:49           ` Edgar Toernig
2005-04-30 12:59             ` David Woodhouse
2005-04-30 13:22               ` Edgar Toernig
2005-05-02 22:10               ` Krzysztof Halasa
2005-05-02 22:26                 ` H. Peter Anvin
2005-05-02 23:30                   ` Krzysztof Halasa
2005-05-02 23:32                     ` H. Peter Anvin
2005-05-03  0:30                       ` Krzysztof Halasa
2005-05-03  0:38                         ` H. Peter Anvin
2005-04-30 23:14           ` H. Peter Anvin
2005-04-30  4:50 ` Edgar Toernig
2005-04-30  5:28 Luck, Tony
2005-04-30 23:14 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).