From: Junio C Hamano Date: Tue, 13 Jan 2015 00:11:06 GMT Subject: Re: [PATCH] blame.c: fix garbled error message Message-ID: In-Reply-To: <20150112231231.GA4023@peff.net> Jeff King writes: > As an aside, I have often been tempted to have xstrdup silently > propagate a NULL. It would have been the right thing to do here, but > maybe there are cases where the segfault is preferable for catching a > mistake early (otherwise you might store the NULL and then segfault much > later). Great minds think alike. The sentence after "but maybe ..." was what I had in mind as a response in anticipation that somebody might suggest that; a separate xstrdup_or_null() might be fine, but I'd rather not to have xstrdup() that is _too_ magical.