Re: [PATCH v2 1/2] t: add a test helper to truncate files
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Oct 13, 2023, 20:18 UTC
- Message-ID
- <ZSmmD5sz7TPWCGRd@tapette.crustytoothpaste.net>
- In-Reply-To
- <xmqqsf6f312s.fsf@gitster.g>
On 2023-10-12 at 22:52:59, Junio C Hamano wrote:
Show 9 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
> > + fd = open(argv[1], O_WRONLY | O_CREAT, 0600);
> > + if (fd < 0)
> > + die_errno("failed to open file %s", argv[1]);
>
> contrib/coccinelle/xopen.cocci tells us to write this simply as
>
> fd = xopen(argv[1], O_WRONLY | O_CREAT, 0600);Sure, I can do that.
-- brian m. carlson (he/him or they/them) Toronto, Ontario, CA