From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id C0E321F4B4 for ; Tue, 13 Apr 2021 20:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbhDMUJM (ORCPT ); Tue, 13 Apr 2021 16:09:12 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:62976 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346406AbhDMUJI (ORCPT ); Tue, 13 Apr 2021 16:09:08 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 7935E123299; Tue, 13 Apr 2021 16:08:48 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=88Y7gzOHgWjIRzGQbzEMkUNSiLc=; b=h6gTC6 kbmYRUjxjSkPVdhPQz0/9a2pFkfcIasodFm8ipNcefPCPcHW91IniHxCrrx46kfE jxzth5Ez8I3GElywt9oEQhMWFZk8LBhH4vrY7jrHV7MbKQjQ0gHcgxEp2NgeedOk TidfGp4g3yh+IwXlnQhqhD1Z1ZXCHvo8QsoCA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=hUDaDemnJdOY9W3jXKcTglc7l7nmOwEC bRWfxdPPsbhBB6cYs5iaxy66Zn49iRlMRyw6JgpbaYQjn+PvTyvqSYWKszXfITMA xHihcspfDCEtLG2dNvc0MdIU31a4h2BAQWtRIHc1M9mJIrm97sTG6IkXj9LpKjVi K1PobA9jg4c= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 72228123297; Tue, 13 Apr 2021 16:08:48 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.243.138.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id B8F3A123296; Tue, 13 Apr 2021 16:08:45 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Han-Wen Nienhuys Cc: Han-Wen Nienhuys via GitGitGadget , git , Han-Wen Nienhuys Subject: Re: [PATCH] refs: print errno for read_raw_ref if GIT_TRACE_REFS is set References: Date: Tue, 13 Apr 2021 13:08:43 -0700 In-Reply-To: (Han-Wen Nienhuys's message of "Tue, 13 Apr 2021 13:58:42 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 0D552118-9C94-11EB-8B3C-D609E328BF65-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Han-Wen Nienhuys writes: >> I do wonder if we want strerror(errno) instead of the number, but I >> can go either way (it's just a trace output). > > For tracing, it would be most useful if we got the actual symbol (eg. > ENOENT). Is there a way to get at that? I do not think there is. And that is the reason why we see everywhere calls to die_errno(), error(..., strerror(errno)), etc. As this is interpolated into trace with untranslated string, I suspect that strerror() is not a good match, so let's live with %d for now. Thanks.