From: Jeff King <peff@peff.net>
To: Johannes Sixt <j6t@kdbg.org>
Cc: "Randall S. Becker" <rsbecker@nexbridge.com>,
"'brian m. carlson'" <sandals@crustytoothpaste.net>,
'Junio C Hamano' <gitster@pobox.com>,
git@vger.kernel.org,
'Linux Kernel' <linux-kernel@vger.kernel.org>,
git-packagers@googlegroups.com
Subject: Re: [Breakage] Git v2.21.0-rc0 - t5318 (NonStop)
Date: Sat, 9 Feb 2019 18:29:28 -0500 [thread overview]
Message-ID: <20190209232928.GA7135@sigill.intra.peff.net> (raw)
In-Reply-To: <38f594ed-0787-aeb5-d34f-2f4775243eb7@kdbg.org>
On Sat, Feb 09, 2019 at 09:39:43AM +0100, Johannes Sixt wrote:
> > Great. Since it sounds like you're preparing some patches to deal with
> > /dev/zero elsewhere, do you want to wrap it up in a patch as part of
> > that?
>
> Please do not use yes to generate an infinite amount of bytes. Our
> implementation of yes() in test-lib.sh generates only 99 lines.
Ah, thanks. That doesn't matter here, but it would for the other patches
under discussion.
> Perhaps do this.
> [...]
> dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=0 &&
> - dd if=/dev/zero of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=$(($orig_size - $zero_pos)) &&
> + printf "%0*d" $(($orig_size - $zero_pos)) 0 | tr 0 '\0' |
> + dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" &&
Using stdin instead of the tmpfile is nice, and shouldn't have any
problems. I do think your printf suggestion looks nice, but I wondered
if it might run into portability issues (not because of anything in
particular, but I often find that the more clever a shell solution, the
more likely we run into obscure problems).
But if it works everywhere, that's fine by me.
-Peff
next prev parent reply other threads:[~2019-02-09 23:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 11:08 [Breakage] Git v2.21.0-rc0 - t5318 (NonStop) Randall S. Becker
2019-02-08 16:50 ` Jeff King
2019-02-08 17:49 ` Randall S. Becker
2019-02-08 18:03 ` Jeff King
2019-02-08 18:29 ` Johannes Sixt
2019-02-08 19:31 ` Junio C Hamano
2019-02-08 18:47 ` Randall S. Becker
2019-02-08 19:15 ` Jeff King
2019-02-08 19:26 ` Randall S. Becker
2019-02-08 19:31 ` Jeff King
2019-02-08 20:38 ` Randall S. Becker
2019-02-08 21:00 ` Jeff King
2019-02-08 21:44 ` Randall S. Becker
2019-02-08 22:07 ` brian m. carlson
2019-02-08 22:12 ` Randall S. Becker
2019-02-08 22:18 ` brian m. carlson
2019-02-08 22:36 ` Randall S. Becker
2019-02-08 22:35 ` Jeff King
2019-02-08 22:53 ` Randall S. Becker
2019-02-09 4:24 ` Jeff King
2019-02-09 8:39 ` Johannes Sixt
2019-02-09 16:55 ` Randall S. Becker
2019-02-09 23:29 ` Jeff King [this message]
2019-02-10 9:40 ` Johannes Sixt
2019-02-09 16:53 ` Randall S. Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190209232928.GA7135@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git-packagers@googlegroups.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).