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

[PATCH 4/4] t6000lib: workaround a possible dash bug

From
EWEric Wong <normalperson@yhbt.net>
Date
May 26, 2006, 02:06 UTC
Message-ID
<11486091792604-git-send-email-normalperson@yhbt.net>
In-Reply-To
<11486091793385-git-send-email-normalperson@yhbt.net>

pdksh doesn't need this patch, of course bash works fine since that what most users use.

Normally, 'var=val command' seems to work fine with dash, but perhaps there's something weird going on with "$@". dash is pretty widespread, so it'll be good to support this even though it does seem like a bug in dash.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 t/t6000lib.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
cba907ce0b1c0927fb15cbb5dd91a4129ff9a950
diff --git a/t/t6000lib.sh b/t/t6000lib.sh
index c6752af..d402621 100755
--- a/t/t6000lib.sh
+++ b/t/t6000lib.sh
@@ -69,7 +69,9 @@ on_committer_date()
 {
     _date=$1
     shift 1
-    GIT_COMMITTER_DATE=$_date "$@"
+    export GIT_COMMITTER_DATE="$_date"
+    "$@"
+    unset GIT_COMMITTER_DATE
 }
 
 # Execute a command and suppress any error output.
-- 
1.3.2.g7d11
Previous: Eric WongNext: Herbert Xu
Message 3 of 13 in “tests: Remove heredoc usage inside quotes”
  1. 2/4 tests: Remove heredoc usage inside quotesEric Wong, May 26, 2006
  2. 3/4 t5500-fetch-pack: remove local (bashism) usage.Eric Wong, May 26, 2006
  3. 4/4 t6000lib: workaround a possible dash bugEric Wong, May 26, 2006
  4. Herbert XuMay 26, 2006
  5. Herbert XuSep 21, 2007
  6. Eric WongSep 21, 2007
  7. Herbert XuSep 26, 2007
  8. Herbert XuMay 26, 2006
  9. Eric WongMay 29, 2006
  10. Junio C HamanoMay 29, 2006
  11. Herbert XuMay 29, 2006
  12. Herbert XuMay 26, 2006
  13. Eric WongMay 29, 2006

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.