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

Re: [PATCH 3/4] fast-import: let importers retrieve blobs

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 3, 2010, 20:17 UTC
Message-ID
<7vsjyeobka.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201012031130.06008.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 8 quoted lines
> But from the tests I get back
>
>   dd: opening `/dev/stdin': No such file or directory
>   error: git-fast-import died of signal 13
>   not ok - 110 R: copy using cat-file
>
> In any case I cannot see a reason to use this construct: 'dd' reads
> from stdin by default, so you could just leave away the option.
Thanks for testing and reporting.
-- >8 --
Subject: t9300: remove unnecessary use of /dev/stdin

We really shouldn't be using these funny /dev/* files that did not exist in V7 UNIX in our tests when we do not have to.

Output from
    $ git grep -n -e /dev/ --and --not -e /dev/null t/

tells us that, aside from use of /dev/urandom in apache.conf used in http tests, "dd if=/dev/stdin" added recently to t/t9300-fast-import.sh are the only offenders, so removing them should be straightforward.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t9300-fast-import.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index d615d04..055ddc6 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -1794,7 +1794,7 @@ test_expect_success PIPE 'R: copy using cat-file' '
 
 	read blob_id type size <&3 &&
 	echo "$blob_id $type $size" >response &&
-	dd if=/dev/stdin of=blob bs=$size count=1 <&3 &&
+	dd of=blob bs=$size count=1 <&3 &&
 	read newline <&3 &&
 
 	cat <<EOF &&
@@ -1845,7 +1845,7 @@ test_expect_success PIPE 'R: print blob mid-commit' '
 		EOF
 
 		read blob_id type size <&3 &&
-		dd if=/dev/stdin of=actual bs=$size count=1 <&3 &&
+		dd of=actual bs=$size count=1 <&3 &&
 		read newline <&3 &&
 
 		echo
@@ -1880,7 +1880,7 @@ test_expect_success PIPE 'R: print staged blob within commit' '
 		echo "cat-blob $to_get" &&
 
 		read blob_id type size <&3 &&
-		dd if=/dev/stdin of=actual bs=$size count=1 <&3 &&
+		dd of=actual bs=$size count=1 <&3 &&
 		read newline <&3 &&
 
 		echo deleteall
Previous: Jonathan NiederNext: Jonathan Nieder
Message 16 of 34 in “[PATCHv2] Add support for subversion dump format v3”
  1. David BarrOct 15, 2010
  2. 1/5 fast-import: Let importers retrieve blobsDavid Barr, Oct 15, 2010
  3. Ramkumar RamachandraOct 18, 2010
  4. Jonathan NiederOct 18, 2010
  5. Jonathan NiederOct 18, 2010
  6. 0/4 fast-import: Let importers retrieve blobsJonathan Nieder, Nov 28, 2010
  7. 1/4 fast-import: stricter parsing of integer optionsJonathan Nieder, Nov 28, 2010
  8. Junio C HamanoNov 30, 2010
  9. 2/4 fast-import: clarify documentation of "feature" commandJonathan Nieder, Nov 28, 2010
  10. 3/4 fast-import: let importers retrieve blobsJonathan Nieder, Nov 28, 2010
  11. fixup! fast-import: let importers retrieve blobsDavid Barr, Nov 29, 2010
  12. David BarrNov 30, 2010
  13. Jonathan NiederNov 30, 2010
  14. Thomas RastDec 3, 2010
  15. Jonathan NiederDec 3, 2010
  16. Junio C HamanoDec 3, 2010
  17. Jonathan NiederDec 3, 2010
  18. Thomas RastDec 4, 2010
  19. Jonathan NiederDec 4, 2010
  20. Documentation/fast-import: capitalize beginning of sentenceJonathan Nieder, Jan 16, 2011
  21. 4/4 fast-import: Allow cat-blob requests at arbitrary points in streamJonathan Nieder, Nov 28, 2010
  22. 2/5 vcs-svn: Extend svndump to parse version 3 formatDavid Barr, Oct 15, 2010
  23. 3/5 vcs-svn: Implement prop-delta handling.David Barr, Oct 15, 2010
  24. Ramkumar RamachandraOct 18, 2010
  25. 4/5 vcs-svn: Add outfile option to buffer_copy_bytes()David Barr, Oct 15, 2010
  26. Jonathan NiederOct 18, 2010
  27. 5/5 svn-fe: Use the cat-blob command to apply deltasDavid Barr, Oct 15, 2010
  28. Ramkumar RamachandraOct 18, 2010
  29. Jonathan NiederOct 18, 2010
  30. Ramkumar RamachandraOct 18, 2010
  31. Jonathan NiederOct 18, 2010
  32. 3/4 fast-import: let importers retrieve blobsJonathan Nieder, Nov 19, 2010
  33. 4/4 fast-import: Allow cat-blob requests at arbitrary points in streamJonathan Nieder, Nov 19, 2010
  34. Sverre RabbelierNov 19, 2010

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.