From patchwork Tue Dec 21 12:33:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han-Wen Nienhuys X-Patchwork-Id: 12689589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 657D1C433F5 for ; Tue, 21 Dec 2021 12:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237629AbhLUMeC (ORCPT ); Tue, 21 Dec 2021 07:34:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237633AbhLUMeC (ORCPT ); Tue, 21 Dec 2021 07:34:02 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5F8BC061574 for ; Tue, 21 Dec 2021 04:34:01 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id c4so26628269wrd.9 for ; Tue, 21 Dec 2021 04:34:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=58ea8xZ1vuskPghyb6KL65sa87qjV0FY0c3NKqo0Nho=; b=l2B1ryoVgYp663Qtk9J3enctZoFVU9Brjfb3nGgdsup1tQYZ1V1OPl1iPKj6mmKm2M g/K5LO2ed289BnrIOa1O4eB4+VFQx+eKQfZk9DCGH9yWzeiFu/HY5p30pTZaxOC5nB11 TWIjCAci/Qx7ojCFR2BBCVCaKKayXkXvNO0Gh7PQaaQAOtkZXhKTz80/cQeDaiYFRj5j /nGcQca9UUZTXHMYsJ+DazCiqpOdxbQuhEXrkrHxqkvvVDm4H2GqQea2euPkrPMg1yGS QQJ9DezXrkRxysSnpvhjaxqNJFWHtVHTiHRE5BQFgEp06wuT5jfZ+R3zs2Zp9v9jtaYr IjTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=58ea8xZ1vuskPghyb6KL65sa87qjV0FY0c3NKqo0Nho=; b=j30hz+rkfu8bYyEs9k3cLIVHsEPHwpRrcWX/tnxniHcEnKvRAYv3BlHz1M6VrBhWBd SVpbkOqp0C9M9EsyRiEcUEOHvtm3dJI390ILIqeti3q/v8kXXDqYMUsn37ezF6B/61et v5pA/PcmoaKTkZ0SQSRm2DvQBHackWALfbJcFatSEHeAGk1C7Y39NwepauXDRy5SH0/v jzFHRn51eOmEtNReIOPcZkJZ+FLTBJbuPfTKxa4pSZSzKFuNSNF9YVu74EXB6uKkkNFc Hhww4BWv0vxxtTwFPsHGiSnkMql2i8LHzcpKTqzoFsX1af8o4z10iru1ZB3EqZhplSQ6 gSLg== X-Gm-Message-State: AOAM531Fj5lMeQOs2bF0hwPye4qZCKP2uBxTH4JBibF6/Y1ng2AoVA8y Kt8lReXo4bqscqBOc+l+IcvvXkwMM6s= X-Google-Smtp-Source: ABdhPJwuRcF8OfxkCX0eJTb1jjnUnVhj2EVl/+p02yS13l52jdm8msYkWCUTq/gU/MzSnIVom1iFjA== X-Received: by 2002:a05:6000:1b8d:: with SMTP id r13mr2503540wru.257.1640090040113; Tue, 21 Dec 2021 04:34:00 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id q8sm6199709wrx.59.2021.12.21.04.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 04:33:59 -0800 (PST) Message-Id: <177d84f8563341c688db8a5b14c043277cfc1106.1640090038.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 21 Dec 2021 12:33:57 +0000 Subject: [PATCH 1/2] refs: print error message in debug output Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Han-Wen Nienhuys Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Han-Wen Nienhuys From: Han-Wen Nienhuys Signed-off-by: Han-Wen Nienhuys --- refs/debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/refs/debug.c b/refs/debug.c index 756d07c7247..cf6ad36fbb0 100644 --- a/refs/debug.c +++ b/refs/debug.c @@ -47,7 +47,8 @@ static int debug_transaction_prepare(struct ref_store *refs, transaction->ref_store = drefs->refs; res = drefs->refs->be->transaction_prepare(drefs->refs, transaction, err); - trace_printf_key(&trace_refs, "transaction_prepare: %d\n", res); + trace_printf_key(&trace_refs, "transaction_prepare: %d \"%s\"\n", res, + err->buf); return res; } From patchwork Tue Dec 21 12:33:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han-Wen Nienhuys X-Patchwork-Id: 12689591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF8D1C4332F for ; Tue, 21 Dec 2021 12:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237635AbhLUMeD (ORCPT ); Tue, 21 Dec 2021 07:34:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237613AbhLUMeC (ORCPT ); Tue, 21 Dec 2021 07:34:02 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33AE2C06173F for ; Tue, 21 Dec 2021 04:34:02 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id c4so26628383wrd.9 for ; Tue, 21 Dec 2021 04:34:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=S4ICO3WBg6iv08HEcE9a2IGnJ3uGqx0NF6JKU8Ns3dI=; b=Py5T8i2X+f0WE+WCSWFAOba9v+cPodLvQAjqCos9moA7nMX5cR6sds2PfYXW7SbZT8 Re3l06KuSTOfOxRtaF/vWF9BFHV/mfbEBDcSVJJpCk87GasCSjex2fLyyRfTmGAzjbpc lWt3Q63Hi1exLIqQX+rX8ee5HeQEWGZ1UJWUlNQoGXB/ndVHEGOC5uKmhWXEwzS9t6a/ 9kDaAzKTk1J8KP772CsKpSePv9KVxT7Ngf2VDRqFwIWhyf4yrDhHRUr4xS1D3O/olywr wbb+FfJhqhxX/4322j4UmVxY4RSsNmsa4p94twb5spDLUyQQcucPIot365ZV23w7GPiw izXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=S4ICO3WBg6iv08HEcE9a2IGnJ3uGqx0NF6JKU8Ns3dI=; b=ik7Se0Im0a9UPbMZkc/lLjma9P16ftMezWncVaas0tCc/JKBtN3e7iN5g/cjj12U3i W3s84y1O6XAjRm+akavV6g2XhEcwq3HU08z1vVEiaZY2ikRDdUeOY4VS6hlDjznZJAIh amyEjiLtcMyLwe+fCUtrrtER95pM16QBOSSQBoCpe9pys9qWovYObVxqpsGkHktVTWxR kFH4rj5Qp3GxhKixrcXRYhIoVN/aIGlI6Noo0TjlShtSxA2bN3TspJ4jGhEc70Y5vi1S JCrwiU6nGHeXJkfZlgcfoPjkAi9ZF95SWQX4z+Ql73WbE/vKPqhbdT37DpqA4v7AQB3D zR9g== X-Gm-Message-State: AOAM533sJlOJON+yJtf5IsV1F1mn5zNM3HBNhqlLzsgWJy/4NAiqRSO1 llb+pttfivd7sgLF3giWZB6ld7/Zje4= X-Google-Smtp-Source: ABdhPJxYxiftUrWtmscM+RG+Ey1PeFyTDG0oGVvnq6kPCuJ+bBQX5xzoYC1/pwGLTBhd/R5nOeWKAg== X-Received: by 2002:adf:816b:: with SMTP id 98mr2535647wrm.201.1640090040697; Tue, 21 Dec 2021 04:34:00 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id m17sm17774776wrw.11.2021.12.21.04.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 04:34:00 -0800 (PST) Message-Id: <75e5392032dbdbdedf8a2b76a7098e4dc1133d82.1640090038.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 21 Dec 2021 12:33:58 +0000 Subject: [PATCH 2/2] refs: set the repo in debug_ref_store.base Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Han-Wen Nienhuys Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Han-Wen Nienhuys From: Han-Wen Nienhuys This is for consistency with the files backend. Signed-off-by: Han-Wen Nienhuys --- refs/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/refs/debug.c b/refs/debug.c index cf6ad36fbb0..136cfd7c700 100644 --- a/refs/debug.c +++ b/refs/debug.c @@ -26,6 +26,7 @@ struct ref_store *maybe_debug_wrap_ref_store(const char *gitdir, struct ref_stor be_copy->name = store->be->name; trace_printf_key(&trace_refs, "ref_store for %s\n", gitdir); res->refs = store; + res->base.repo = store->repo; base_ref_store_init((struct ref_store *)res, be_copy); return (struct ref_store *)res; }