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

Re: [Breakage] Git v2.21.0-rc0 - t5318 (NonStop)

From
Jeff King <peff@peff.net>
Date
Feb 8, 2019, 19:31 UTC
Message-ID
<20190208193157.GA30952@sigill.intra.peff.net>
In-Reply-To
<002b01d4bfe4$2d617f40$88247dc0$@nexbridge.com>
On Fri, Feb 08, 2019 at 02:26:17PM -0500, Randall S. Becker wrote:
Show 10 quoted lines
> > > For this, we could use truncate -s count file instead of dd to get a
> > > fixed size file of nulls. This would remove the need for /dev/zero in
> > > t5318 (the patch below probably will wrap badly in my mailer so I can
> > > submit a real patch separately.
> > 
> > I don't think "truncate" is portable, though.
> 
> It is available AFAIK on Linux, POSIX, and Windows under Cygwin.
> That's more than /dev/zero has anyway. I have the patch ready if you
> want it.

Is it POSIX? Certainly truncate() is, but I didn't think the command-line tool was. If it really is available everywhere, then yeah, I'd be fine with it.

Show 9 quoted lines
> > > > Other cases don't seem to actually care that they're getting NULs,
> > > > and are just redirecting stdin from /dev/zero to get an infinite
> > > > amount of input. They could probably use "yes" for that.
> > >
> > > What about reading from /dev/null?
> > 
> > That would yield zero bytes, not an infinite number of them.
> 
> So something like: yes | tr 'y' '\0' | stuff?

Exactly (if we even care about them being NULs; otherwise, we can omit the "tr" invocation).

-Peff
Previous: Randall S. BeckerNext: Randall S. Becker
Message 10 of 25 in “[Breakage] Git v2.21.0-rc0 - t5318 (NonStop)”
  1. Randall S. BeckerFeb 8, 2019
  2. Jeff KingFeb 8, 2019
  3. Randall S. BeckerFeb 8, 2019
  4. Jeff KingFeb 8, 2019
  5. Johannes SixtFeb 8, 2019
  6. Junio C HamanoFeb 8, 2019
  7. Randall S. BeckerFeb 8, 2019
  8. Jeff KingFeb 8, 2019
  9. Randall S. BeckerFeb 8, 2019
  10. Jeff KingFeb 8, 2019
  11. Randall S. BeckerFeb 8, 2019
  12. Jeff KingFeb 8, 2019
  13. Randall S. BeckerFeb 8, 2019
  14. brian m. carlsonFeb 8, 2019
  15. Randall S. BeckerFeb 8, 2019
  16. brian m. carlsonFeb 8, 2019
  17. Randall S. BeckerFeb 8, 2019
  18. Jeff KingFeb 8, 2019
  19. Randall S. BeckerFeb 8, 2019
  20. Jeff KingFeb 9, 2019
  21. Johannes SixtFeb 9, 2019
  22. Randall S. BeckerFeb 9, 2019
  23. Jeff KingFeb 9, 2019
  24. Johannes SixtFeb 10, 2019
  25. Randall S. BeckerFeb 9, 2019

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.