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

Re: [PATCH] Unset TZ in t5000

From
MAMark Allen <mrallen1@yahoo.com>
Date
Jun 14, 2005, 13:17 UTC
Message-ID
<20050614131727.23011.qmail@web41211.mail.yahoo.com>
In-Reply-To
<42ADAC4D.7050408@lsrfire.ath.cx>
--- Rene Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:> Mark Allen schrieb:
 > The expression
Show 5 quoted lines
> 
>    length($5)<7 ? $5":00" : $5
> 
> (where $5 is a time value) is there to cope with tars that format the
> time like hh:mm instead of the expected hh:mm:ss.

I put (escaped) parenthesis around the length function and now it works as expected. Here's a new patch. Please ack if you approve.

Thanks,
--Mark
Signed-off-by: Mark Allen <mrallen1@yahoo.com>
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -50,8 +50,9 @@ test_expect_success \
 
 test_expect_success \
     'validate file modification time' \
-    'tar tvf b.tar a/a |
-     awk \{print\ \$4,\ length\(\$5\)\<7\ ?\ \$5\":00\"\ :\ \$5\} >b.mtime &&
+    'TZ= tar tvf b.tar a/a |
+     awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \
+     >b.mtime &&
      echo "2005-05-27 22:00:00" >expected.mtime &&
      diff expected.mtime b.mtime'
 
Previous: Mark AllenNext: Rene Scharfe
Message 4 of 6 in “Unset TZ in t5000”
  1. Unset TZ in t5000Mark Allen, Jun 13, 2005
  2. Rene ScharfeJun 13, 2005
  3. Mark AllenJun 13, 2005
  4. Mark AllenJun 14, 2005
  5. Rene ScharfeJun 14, 2005
  6. Mark AllenJun 14, 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.