From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kDZACCDIbWdwgQEA62LTzQ:P1 (envelope-from ) for ; Thu, 26 Dec 2024 21:18:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kDZACCDIbWdwgQEA62LTzQ (envelope-from ) for ; Thu, 26 Dec 2024 22:18:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=JCFulyCO; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XRevEsef; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735247903; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=x+CQiXnYtzxGxiy1bsiar5AJAQiKgFWxBM8fN8FAdwo=; b=Q3gi81H6Idaji1qHoXrToSuh1/rjN7AngCe1JvjdyGJ5Tb5W+xMRbkvKke9ZKhPOeafsrM xGF0nc+ZHxSooKhq8zI9ObdP5RsLg2gk7e/KhrfPnAdU6hesY7Tw+WSmYVw2NIKVvi0+wn /0rUT1mQY7HQW4e98xng5b0dHnb/zw0gxesf462t5lk1lTcJTP02clN+/vyO6xI+XaazRx H/VFYGGJaNofUFqlv/l+IJ4YwY2mEvzzjD0ywuUntNBfnSuSllYrkg6wDtuS+3jqT48a30 BOpB5LghO7B/EYaKKJBuBVcYvbNL6umcfRq5thiVyACd2oX+FxSOWRwydb0W3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=JCFulyCO; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XRevEsef; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735247903; a=rsa-sha256; cv=none; b=qQYi79xYVtUz1tSUvwNXakHdq40FJG4xMMP+PsgbA0KZCPzi4Fn78vrK4R3KNC66D+/wca k57MMvKcAUZt7Q1+SOdFrcdhlOPq0SGJYosJOPtgas1my42Ui0SlJd282vMPiy+I4fAJ6p MhBqYthrhKz8Foy7eQATnFE5mAOCh1HyFPxU6CJzU1gXhHnFHcRFPV2FhSjo1BVVAtT4gT PfIA8wyUU6FlRdtt8+/ZzV05tZoQvI4nk/p4xlPQtWGcjq+otl+OgY8TAQmSdvB1EIVUOK uu/2TB0E7gX71P6JDJ4jWSTFB5k5bhBzcKHDIp7grHyeAY3+b6wPyFS2BsC24w== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 576AA96FCE for ; Thu, 26 Dec 2024 22:18:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQvF5-0003W1-Qu; Thu, 26 Dec 2024 16:18:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQvF4-0003VW-As for guix-patches@gnu.org; Thu, 26 Dec 2024 16:18:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQvF4-0002pG-2S for guix-patches@gnu.org; Thu, 26 Dec 2024 16:18:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=x+CQiXnYtzxGxiy1bsiar5AJAQiKgFWxBM8fN8FAdwo=; b=JCFulyCOiarVvRswzbmC+gPpiMxN/n1wOwsNAoa98baTaAiSfqZhl93CWuGV1nEK1rMGFCPharAMvhPZXNXi0DNQ5P9Pi2kjIAX2ObDjBcRgGDcJl2+BhaLc2CVbnt0g7QVgOuSrqnXDmULx5ETnEu2Q0WX6DDYg/6B7UO1XiiigoHAQGynsN+tsmz5Pgckpo422wEvzk8TJRXxIpembd4XUI2ZtvHTz4Iipsp1gU4WqeAi6eX6AHz4x06GHKIe2zwTlSCYjS6utlZiZh3wu1EdTZLH8F7/H2wx7z2LE3NVYTCjM1/cHzts9iSTV7tnFI7va/F7uFt06ngC2L+AsyA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQvF3-0002Y4-SK for guix-patches@gnu.org; Thu, 26 Dec 2024 16:18:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Dec 2024 21:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74481 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier Cc: Christopher Baines , Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe , 74481@debbugs.gnu.org Received: via spool by 74481-submit@debbugs.gnu.org id=B74481.17352478639756 (code B ref 74481); Thu, 26 Dec 2024 21:18:01 +0000 Received: (at 74481) by debbugs.gnu.org; 26 Dec 2024 21:17:43 +0000 Received: from localhost ([127.0.0.1]:42460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQvEk-0002XH-IT for submit@debbugs.gnu.org; Thu, 26 Dec 2024 16:17:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQvEi-0002X0-BS for 74481@debbugs.gnu.org; Thu, 26 Dec 2024 16:17:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQvEd-0002nJ-2y; Thu, 26 Dec 2024 16:17:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=x+CQiXnYtzxGxiy1bsiar5AJAQiKgFWxBM8fN8FAdwo=; b=XRevEsef/jsCrd9KOcF5 d2WE0BoKJpAWH7YAw9wOUpt+nO3P5r8mdTWGPuSsErdkwfA6TsXzwWeSSqvnxq0bAqZnF8I3vkr4T mZYGZu6UGaYz0lsXWMGNRlQdCZ4vnkr+6vQNlNiHjVeXR4VZ5aJg5LT/18emJp+Dws0ABugL1wzjM iwtVShwd619c2ceemac60KWgH/9Zc3n7UvTA9aPJaYWsJ/KGnLCmj1HARZ1pGtPLO5XZkwGWm5uYL aLogmOM22QNWkpU/ti6theV+zoKps8ZRYAY3sO01vs/2YkCA2B8j3C9S9WsDMBc7w1VqBV5i07mHl HiMYjCTV5ZfVXg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87seqmfall.fsf@gmail.com> (Simon Tournier's message of "Tue, 17 Dec 2024 19:06:14 +0100") References: <87bjxhb0da.fsf@gnu.org> <877c7yr336.fsf@gnu.org> <87seqmfall.fsf@gmail.com> Date: Thu, 26 Dec 2024 22:17:32 +0100 Message-ID: <878qs216vn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -7.11 X-Spam-Score: -7.11 X-Migadu-Queue-Id: 576AA96FCE X-TUID: CUQbRarHbQiL Simon Tournier skribis: > On Tue, 17 Dec 2024 at 11:55, Ludovic Court=C3=A8s wrote: > >> We have something that can now return #f instead of throwing an >> exception. The many users of this interface are not prepared for this; >> worse, getting #f instead of an exception means we lose information as >> to why =E2=80=98update-cached-checkout=E2=80=99 or similar failed. > > Thanks for explaining. > > Well, I=E2=80=99d say =E2=80=9Cmouais=E2=80=9C :-) about =C2=AB lose info= rmation =C2=BB since I added some > =E2=80=99pk=E2=80=99 here or there before finding the relevant piece of c= ode. So the > exception is not very helpful, not to say fully useless, IMHO. The exception conveys information about the failure: no space left on device, host unreachable, invalid certificate, etc. Often =E2=80=98with-git-error-handling=E2=80=99 is used at the top-level be= cause the error is not recoverable so we just want to print an error message and exit. In other cases, we explicitly want to catch, say, GIT_ENOTFOUND because there=E2=80=99s a fallback path in this case. Ludo=E2=80=99.