Re: [PATCH v2 1/5] Makefile: rename objects in-place, don't clobber
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 29, 2021, 18:26 UTC
- Message-ID
- <xmqqr1jxke8h.fsf@gitster.g>
- In-Reply-To
- <xmqqy2e5kegv.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
>> thing: >> rm -f thing thing+ >> prepare contents for thing >thing+ > > Did I say that? I recall I specifically avoided the "redirection" > because this is *NOT* shell-script only principle.
Ah, I did say that in the response to the previous iteration. But the same principle applied to your other patch for [ce]tags which took "-o output", and I was recalling my response to that thread.
In any case, whether "cmd >thing" or "cmd -o thing", if cmd leaves a broken output in thing when it fails, it needs the "into thing+ and rename to thing" dance. Redirecion always need it, but a well behaved command like $(CC) should not need it.
Thanks.