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

Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 1, 2012, 18:40 UTC
Message-ID
<5092C234.9000307@ramsay1.demon.co.uk>
In-Reply-To
<20121029102114.GA14497@sigill.intra.peff.net>
Jeff King wrote:
> What's cooking in git.git (Oct 2012, #09; Mon, 29)
> --------------------------------------------------
> 
[snip]
Show 7 quoted lines
> * cr/cvsimport-local-zone (2012-10-16) 1 commit
>  - git-cvsimport: allow author-specific timezones
> 
>  Allows "cvsimport" to read per-author timezone from the author info
>  file.
> 
>  Will merge to 'next'.
Just FYI, t9604-cvsimport-timestamps.sh is still failing for me.

I haven't spent too long on this yet, but I had hoped that setting TZ would sidestep any DST issues. (I have downloaded new tzdata, but have yet to install - actually I don't really want to!). It is not clear from the tzset manpage what happens if you use the DST format for TZ, but you don't provide the start/end date for DST, which is what this test is doing.

Perhaps the test should use the non-DST format? e.g. "TZ=CST6 git ..." Does the test really care about DST? (*if* that is indeed the problem).

Also: Note that the first test calls git-cvsimport twice, first *with*
TZ set then again without; I suspect a cut/paste editing error.
I have added the output of "./t9604-cvsimport-timestamps.sh -v" below.

ATB, Ramsay Jones

ramsay@ramsay-laptop:$ ./t9604-cvsimport-timestamps.sh -v Initialized empty Git repository in /home/ramsay/git/t/trash directory.t9604-cvsimport-timestamps/.git/ expecting success:

        TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
        git cvsimport -p"-x" -C module-1 module &&
        (
                cd module-1 &&
                git log --format="%s %ai"
        ) >actual-1 &&
        cat >expect-1 <<-EOF &&
        Rev 16 2006-10-29 07:00:01 +0000
        Rev 15 2006-10-29 06:59:59 +0000
        Rev 14 2006-04-02 08:00:01 +0000
        Rev 13 2006-04-02 07:59:59 +0000
        Rev 12 2005-12-01 00:00:00 +0000
        Rev 11 2005-11-01 00:00:00 +0000
        Rev 10 2005-10-01 00:00:00 +0000
        Rev  9 2005-09-01 00:00:00 +0000
        Rev  8 2005-08-01 00:00:00 +0000
        Rev  7 2005-07-01 00:00:00 +0000
        Rev  6 2005-06-01 00:00:00 +0000
        Rev  5 2005-05-01 00:00:00 +0000
        Rev  4 2005-04-01 00:00:00 +0000
        Rev  3 2005-03-01 00:00:00 +0000
        Rev  2 2005-02-01 00:00:00 +0000
        Rev  1 2005-01-01 00:00:00 +0000
        EOF
        test_cmp actual-1 expect-1
Initialized empty Git repository in /home/ramsay/git/t/trash directory.t9604-cvsimport-timestamps/module-1/.git/
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
Already up-to-date.
--- actual-1    2012-10-31 21:20:20.000000000 +0000
+++ expect-1    2012-10-31 21:20:20.000000000 +0000
@@ -13,4 +13,4 @@
 Rev  4 2005-04-01 00:00:00 +0000
 Rev  3 2005-03-01 00:00:00 +0000
 Rev  2 2005-02-01 00:00:00 +0000
-Rev  1 2004-12-31 18:00:00 +0000
+Rev  1 2005-01-01 00:00:00 +0000
not ok 1 - check timestamps are UTC (TZ=CST6CDT)
#
#
#               TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
#               git cvsimport -p"-x" -C module-1 module &&
#               (
#                       cd module-1 &&
#                       git log --format="%s %ai"
#               ) >actual-1 &&
#               cat >expect-1 <<-EOF &&
#               Rev 16 2006-10-29 07:00:01 +0000
#               Rev 15 2006-10-29 06:59:59 +0000
#               Rev 14 2006-04-02 08:00:01 +0000
#               Rev 13 2006-04-02 07:59:59 +0000
#               Rev 12 2005-12-01 00:00:00 +0000
#               Rev 11 2005-11-01 00:00:00 +0000
#               Rev 10 2005-10-01 00:00:00 +0000
#               Rev  9 2005-09-01 00:00:00 +0000
#               Rev  8 2005-08-01 00:00:00 +0000
#               Rev  7 2005-07-01 00:00:00 +0000
#               Rev  6 2005-06-01 00:00:00 +0000
#               Rev  5 2005-05-01 00:00:00 +0000
#               Rev  4 2005-04-01 00:00:00 +0000
#               Rev  3 2005-03-01 00:00:00 +0000
#               Rev  2 2005-02-01 00:00:00 +0000
#               Rev  1 2005-01-01 00:00:00 +0000
#               EOF
#               test_cmp actual-1 expect-1
#

expecting success: 

        cat >cvs-authors <<-EOF &&
        user1=User One <user1@domain.org>
        user2=User Two <user2@domain.org> CST6CDT
        user3=User Three <user3@domain.org> EST5EDT
        user4=User Four <user4@domain.org> MST7MDT
        EOF
        git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
        (
                cd module-2 &&
                git log --format="%s %ai %an"
        ) >actual-2 &&
        cat >expect-2 <<-EOF &&
        Rev 16 2006-10-29 01:00:01 -0600 User Two
        Rev 15 2006-10-29 01:59:59 -0500 User Two
        Rev 14 2006-04-02 03:00:01 -0500 User Two
        Rev 13 2006-04-02 01:59:59 -0600 User Two
        Rev 12 2005-11-30 17:00:00 -0700 User Four
        Rev 11 2005-10-31 19:00:00 -0500 User Three
        Rev 10 2005-09-30 19:00:00 -0500 User Two
        Rev  9 2005-09-01 00:00:00 +0000 User One
        Rev  8 2005-07-31 18:00:00 -0600 User Four
        Rev  7 2005-06-30 20:00:00 -0400 User Three
        Rev  6 2005-05-31 19:00:00 -0500 User Two
        Rev  5 2005-05-01 00:00:00 +0000 User One
        Rev  4 2005-03-31 17:00:00 -0700 User Four
        Rev  3 2005-02-28 19:00:00 -0500 User Three
        Rev  2 2005-01-31 18:00:00 -0600 User Two
        Rev  1 2005-01-01 00:00:00 +0000 User One
        EOF
        test_cmp actual-2 expect-2

Initialized empty Git repository in /home/ramsay/git/t/trash directory.t9604-cvsimport-timestamps/module-2/.git/
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
--- actual-2    2012-10-31 21:20:21.000000000 +0000
+++ expect-2    2012-10-31 21:20:21.000000000 +0000
@@ -1,16 +1,16 @@
 Rev 16 2006-10-29 01:00:01 -0600 User Two
 Rev 15 2006-10-29 01:59:59 -0500 User Two
 Rev 14 2006-04-02 03:00:01 -0500 User Two
-Rev 13 2006-04-02 00:59:59 -0600 User Two
-Rev 12 2005-11-30 19:00:00 -0700 User Four
-Rev 11 2005-10-31 18:00:00 -0500 User Three
-Rev 10 2005-10-01 01:00:00 -0500 User Two
-Rev  9 2005-08-31 18:00:00 +0000 User One
-Rev  8 2005-07-31 20:00:00 -0600 User Four
-Rev  7 2005-06-30 19:00:00 -0400 User Three
-Rev  6 2005-06-01 01:00:00 -0500 User Two
-Rev  5 2005-04-30 18:00:00 +0000 User One
-Rev  4 2005-03-31 19:00:00 -0700 User Four
-Rev  3 2005-02-28 18:00:00 -0500 User Three
-Rev  2 2005-02-01 00:00:00 -0600 User Two
+Rev 13 2006-04-02 01:59:59 -0600 User Two
+Rev 12 2005-11-30 17:00:00 -0700 User Four
+Rev 11 2005-10-31 19:00:00 -0500 User Three
+Rev 10 2005-09-30 19:00:00 -0500 User Two
+Rev  9 2005-09-01 00:00:00 +0000 User One
+Rev  8 2005-07-31 18:00:00 -0600 User Four
+Rev  7 2005-06-30 20:00:00 -0400 User Three
+Rev  6 2005-05-31 19:00:00 -0500 User Two
+Rev  5 2005-05-01 00:00:00 +0000 User One
+Rev  4 2005-03-31 17:00:00 -0700 User Four
+Rev  3 2005-02-28 19:00:00 -0500 User Three
+Rev  2 2005-01-31 18:00:00 -0600 User Two
 Rev  1 2005-01-01 00:00:00 +0000 User One
not ok 2 - check timestamps with author-specific timezones
#
#
#               cat >cvs-authors <<-EOF &&
#               user1=User One <user1@domain.org>
#               user2=User Two <user2@domain.org> CST6CDT
#               user3=User Three <user3@domain.org> EST5EDT
#               user4=User Four <user4@domain.org> MST7MDT
#               EOF
#               git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
#               (
#                       cd module-2 &&
#                       git log --format="%s %ai %an"
#               ) >actual-2 &&
#               cat >expect-2 <<-EOF &&
#               Rev 16 2006-10-29 01:00:01 -0600 User Two
#               Rev 15 2006-10-29 01:59:59 -0500 User Two
#               Rev 14 2006-04-02 03:00:01 -0500 User Two
#               Rev 13 2006-04-02 01:59:59 -0600 User Two
#               Rev 12 2005-11-30 17:00:00 -0700 User Four
#               Rev 11 2005-10-31 19:00:00 -0500 User Three
#               Rev 10 2005-09-30 19:00:00 -0500 User Two
#               Rev  9 2005-09-01 00:00:00 +0000 User One
#               Rev  8 2005-07-31 18:00:00 -0600 User Four
#               Rev  7 2005-06-30 20:00:00 -0400 User Three
#               Rev  6 2005-05-31 19:00:00 -0500 User Two
#               Rev  5 2005-05-01 00:00:00 +0000 User One
#               Rev  4 2005-03-31 17:00:00 -0700 User Four
#               Rev  3 2005-02-28 19:00:00 -0500 User Three
#               Rev  2 2005-01-31 18:00:00 -0600 User Two
#               Rev  1 2005-01-01 00:00:00 +0000 User One
#               EOF
#               test_cmp actual-2 expect-2
#

# failed 2 among 2 test(s)
1..2
ramsay@ramsay-laptop:$
Previous: Jeff KingNext: Chris Rorvick
Message 2 of 10 in “What's cooking in git.git (Oct 2012, #09; Mon, 29)”
  1. Jeff KingOct 29, 2012
  2. Ramsay JonesNov 1, 2012
  3. Chris RorvickNov 2, 2012
  4. Jeff KingNov 2, 2012
  5. Jeff KingNov 2, 2012
  6. Ramsay JonesNov 2, 2012
  7. Jeff KingNov 4, 2012
  8. Ramsay JonesNov 10, 2012
  9. Jeff KingNov 11, 2012
  10. Ramsay JonesNov 13, 2012

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.