From patchwork Tue Dec 4 13:27:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10711741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D08518A7 for ; Tue, 4 Dec 2018 13:27:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4009C29F9C for ; Tue, 4 Dec 2018 13:27:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 342092A487; Tue, 4 Dec 2018 13:27:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D97372AA55 for ; Tue, 4 Dec 2018 13:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbeLDN1Z (ORCPT ); Tue, 4 Dec 2018 08:27:25 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51471 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725910AbeLDN1Y (ORCPT ); Tue, 4 Dec 2018 08:27:24 -0500 Received: by mail-wm1-f65.google.com with SMTP id s14so9619680wmh.1 for ; Tue, 04 Dec 2018 05:27:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=anv3R5BIcWXhqjtUM9rlrbSpb7kjRg5tyczvk27cQ8s=; b=I02g75boYvNgM84+ZXUuAMUKRcBcGuV3Te+wMKCOEGL19+U/iO+nAN2Yy1el3x7wNe mNkT1C3MxTtvmMfevh74uFNSdvW9J9rSmGt13C2oR0fRGrDailYpJWtwmdJ1h0XbZRsQ ox2tTeD9Mz5wUFNwT5Kxo/XeVProvqYmcPK6a0/dxGFVjqHlgpUbV2Whsac8SXfx6+H/ c/qJW1+Hz4e/9Phvk4X+DuENsQ8zBcl0JwRdCAz7AEpTbsxMqPFnxGZ+227+D1NVUd/f 6bLMsI9LXIa2JqPuUSAhMNtNgV0SGIJ1jOqUoFyUUQ3KHiq9JaYwvPDHposVCrtunpxw tzJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=anv3R5BIcWXhqjtUM9rlrbSpb7kjRg5tyczvk27cQ8s=; b=NXTRc+Sm/dyyjoS9lmi1/T02RIF9LfaSsb5FmYBEiv2MeQsfj26PPPxZsqNdWX4xRW KDdHQKzqArYhgu57itsJbAM5o35rvxvMXgA+363aq0VtIJSwksraC+8UhCiutigaHEOb gf1hXk774XVPd7AB8+vgvIIgBgI2fbDBS/561kn0LhZBewQYiS4kbKht/Gaw1WTpKRdd VDxyoYNvs0X/1YXfc8yv8dAbeFDhVzZhQyc4K4hlR44qdWTCG44/PYvQZ2nC5Kp80Efh bB3xZFJiJBJJNuHVdS90spkbW4kgVsF4TrdH16TS62cCfonWRWT68BpTd7qLr7fXS315 KtVw== X-Gm-Message-State: AA+aEWa14rWiw5Qa3outrGrSRgOU8nrv871jbKya62gQJVg9h8J8Z9Ht LdUP0hv+7oSWbhsAWY9HyX7C/Qsu X-Google-Smtp-Source: AFSGD/Vtu8UrZdvKWS8vMjxQaRF3Nyh+QLJvXI/IdV8ND3e7NFDOHvXZ2gcVqz1EoDIbI8kya7q2Xw== X-Received: by 2002:a1c:c303:: with SMTP id t3mr11646178wmf.94.1543930042074; Tue, 04 Dec 2018 05:27:22 -0800 (PST) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id h16sm24588523wrb.62.2018.12.04.05.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 05:27:21 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Derrick Stolee , Christian Couder , =?utf-8?b?w4Z2YXIgQXJuZmo=?= =?utf-8?b?w7Zyw7AgQmphcm1hc29u?= Subject: [PATCH 1/3] sha1-file: test the error behavior of alt_odb_usable() Date: Tue, 4 Dec 2018 14:27:14 +0100 Message-Id: <20181204132716.19208-2-avarab@gmail.com> X-Mailer: git-send-email 2.20.0.rc2.403.gdbc3b29805 In-Reply-To: <87tvjtvah0.fsf@evledraar.gmail.com> References: <87tvjtvah0.fsf@evledraar.gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a test for the error() case in alt_odb_usable() where an alternate directory doesn't exist. This behavior has been the same since 26125f6b9b ("detect broken alternates.", 2006-02-22), but if that error() was turned into die() the entire test suite would still pass. Perhaps we should die() in that case, but let's start by adding a test here to assert the long-standing existing behavior. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5613-info-alternate.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh index 895f46bb91..d2964c57b7 100755 --- a/t/t5613-info-alternate.sh +++ b/t/t5613-info-alternate.sh @@ -136,4 +136,11 @@ test_expect_success CASE_INSENSITIVE_FS 'dup finding can be case-insensitive' ' test_cmp expect actual.alternates ' +test_expect_success 'print "error" on non-existing alternate' ' + git init --bare I && + echo DOES_NOT_EXIST >I/objects/info/alternates && + git -C I fsck 2>stderr && + test_i18ngrep "does not exist; check" stderr +' + test_done From patchwork Tue Dec 4 13:27:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10711745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 017A716B1 for ; Tue, 4 Dec 2018 13:27:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8E4F2A487 for ; Tue, 4 Dec 2018 13:27:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCC8C2B86A; Tue, 4 Dec 2018 13:27:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E0F52A487 for ; Tue, 4 Dec 2018 13:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbeLDN12 (ORCPT ); Tue, 4 Dec 2018 08:27:28 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34746 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725910AbeLDN11 (ORCPT ); Tue, 4 Dec 2018 08:27:27 -0500 Received: by mail-wm1-f65.google.com with SMTP id y185so9416665wmd.1 for ; Tue, 04 Dec 2018 05:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uqtlQCd0S/QhYiJrEkVko4QdOzj+nHISlCCYXO7zjCU=; b=TGgSAduP5si8cWIj8a5k2oqPL1url0HwzPsP8ApNBBMAyXQ8SdLQArZCMSsRov6oMq yrX19Z3hvolUJ4hIjT5dJeeU37DvF6GBCzA+XDw1ImRNteJ5ZE2SPQWUu6uTG1L4+xL2 vBbvZ0pesbFfOkXheoimEMFHvcENz3xCShl4dPKX2ez6byLS8CWANlFbzp9Pvp9v9V2Q OdkABgOcZ+olpQVNXqmUIs7rrDRQ/jGsjSGAD8xorb6cgmvGn0Osfmvq1i5gLFlT6N6V pbvLStBeA1VGMTv+dDsJCGW0FxWA9c2o0JOjtUV1zzKf7RBWUxTTcTPAOfEdrfAjtjOG EOsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uqtlQCd0S/QhYiJrEkVko4QdOzj+nHISlCCYXO7zjCU=; b=DbVhQY2xPL4fxJVx7pnlSDjfjA6vlYIDi54eVGsogjevsbbQJslyAt9JnyufW7v7M3 QePapYMLV+E0/jXjmk7O0DtuN63WKwrIb7Gi/Um/iKeEobB5jd+fRRGxkNc3Sa02lJ/I kPc2738o82v7qY0LVvUMSqiLgd65IqT5HGdIXBHEocpI1lJZT1tIlAzwBzOaf8YxlGLC GrKUcZmGWVv8mtovhRQzOUrF5VkBbhIZnc+X7SERvn6IEJf7pRuclHRqwpQKep0s+fC2 D3OAN3mVLcyeh3ZL2FuuCXgfoPb9za//9AFtr2RQJKRIQDKpIGJFRPQAD65TfF8S/Bzw mqbw== X-Gm-Message-State: AA+aEWbfmhhpeMpXldN4NOdzoXH3YKaSlKKS0EuHnXFYnx382+14X+B4 CAgP/8IiNZw0ZRfi2UvoAl8s7Cly X-Google-Smtp-Source: AFSGD/ULj1O9/wK9Q2WjCLyFeWUfTXvmHhw2+AzPQSwG1CPmjM3VRIvo1P1MnimOlA8TFvPRzrzX6Q== X-Received: by 2002:a1c:2d0c:: with SMTP id t12-v6mr6034112wmt.99.1543930043828; Tue, 04 Dec 2018 05:27:23 -0800 (PST) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id h16sm24588523wrb.62.2018.12.04.05.27.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 05:27:22 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Derrick Stolee , Christian Couder , =?utf-8?b?w4Z2YXIgQXJuZmo=?= =?utf-8?b?w7Zyw7AgQmphcm1hc29u?= Subject: [PATCH 2/3] sha1-file: emit error if an alternate looks like a repository Date: Tue, 4 Dec 2018 14:27:15 +0100 Message-Id: <20181204132716.19208-3-avarab@gmail.com> X-Mailer: git-send-email 2.20.0.rc2.403.gdbc3b29805 In-Reply-To: <87tvjtvah0.fsf@evledraar.gmail.com> References: <87tvjtvah0.fsf@evledraar.gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since 26125f6b9b ("detect broken alternates.", 2006-02-22) we've emitted an error if the alternates directory doesn't exist, but not for the common misstep of adding a path to another git repository as an alternate, as opposed to its "objects" directory. Let's check for this, i.e. whether X/objects or X/.git/objects exists if the user supplies X and print an error (which as a commit leading up to this one shows doesn't change the exit code, just "warns"). This check is intentionally not implemented by e.g. requiring that any of X/?? exists or X/info or X/pack exists. It's a legitimate use-case to point to an existing alternate that hasn't been populated yet, but pointing to one where an "X/objects" or "X/.git/objects" directory exists is definitely a mistake we should warn the user about. Signed-off-by: Ævar Arnfjörð Bjarmason --- sha1-file.c | 10 +++++++++- t/t5613-info-alternate.sh | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/sha1-file.c b/sha1-file.c index 5bd11c85bc..f142f81658 100644 --- a/sha1-file.c +++ b/sha1-file.c @@ -376,12 +376,20 @@ static int alt_odb_usable(struct raw_object_store *o, { struct alternate_object_database *alt; - /* Detect cases where alternate disappeared */ if (!is_directory(path->buf)) { + /* Detect cases where alternate disappeared */ error(_("object directory %s does not exist; " "check .git/objects/info/alternates"), path->buf); return 0; + } else if (is_directory(mkpath("%s/objects", path->buf)) || + is_directory(mkpath("%s/.git/objects", path->buf))) { + /* Detect cases where alternate is a git repository */ + error(_("object directory %s looks like a git repository; " + "alternates must point to the 'objects' directory. " + "check .git/objects/info/alternates"), + path->buf); + return 0; } /* diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh index d2964c57b7..b959e21421 100755 --- a/t/t5613-info-alternate.sh +++ b/t/t5613-info-alternate.sh @@ -143,4 +143,18 @@ test_expect_success 'print "error" on non-existing alternate' ' test_i18ngrep "does not exist; check" stderr ' +test_expect_success 'print "error" on alternate that looks like a git repository' ' + git init --bare J && + git init --bare K && + + # H is bare, G is not + echo ../../H >J/objects/info/alternates && + echo ../../G >K/objects/info/alternates && + + git -C J fsck 2>stderr && + test_i18ngrep "looks like a git repository; alternates must" stderr && + git -C K fsck 2>stderr && + test_i18ngrep "looks like a git repository; alternates must" stderr +' + test_done From patchwork Tue Dec 4 13:27:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10711747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B21AB1923 for ; Tue, 4 Dec 2018 13:27:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5ADA2A487 for ; Tue, 4 Dec 2018 13:27:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A8E62AA55; Tue, 4 Dec 2018 13:27:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EF302B865 for ; Tue, 4 Dec 2018 13:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726352AbeLDN13 (ORCPT ); Tue, 4 Dec 2018 08:27:29 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:54022 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbeLDN12 (ORCPT ); Tue, 4 Dec 2018 08:27:28 -0500 Received: by mail-wm1-f66.google.com with SMTP id y1so9539299wmi.3 for ; Tue, 04 Dec 2018 05:27:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tj5JmRxHr9TefsIYK1CB2jUX3VOiupQ4+7aGkUAQS3w=; b=gl08GYBiMtqG1jdjMDiPUWW2qxHdgA0DpskWD6Ts9OaYWn3kYwbAgjC+/VL4IIHTPu eRWCiZ8SVxGhkJC2sKJjfcRYImzd6l20+sFDppwJchQox7EE0eq9iCrQEQDt6qi1d2PL APCXkTF3rm3MIVVE+EWQB3i6OarM5BnZDCMdgcZMEJuu9jQzoHtT0DzFj8PNYTvZ7VfT Sj19NSNWM78B2Vr57G/VyU8GqMFxSWxGovQTGIxbu201iL/tXM+NELKYNPewJjJvKxp9 CkhCxeU8mB9y9Htt0da3VXnuK7znKifBq7AuML8gTud3e9MmpY7V92jqsqlzf89DA8uA XKwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tj5JmRxHr9TefsIYK1CB2jUX3VOiupQ4+7aGkUAQS3w=; b=MrauaEJ+lT6imjYQDfJKuO4zGVCiE5dEpohx3C+mZuDuAlM1yGQDV8UyMqMw+vroBa tJAbBX/YOudzCDdmXtRKhBL5R8pE6acqEkitkAYyvRpvppmXwQiu5Fp/ZztNhkNkGBFg ZkXwMZq2w6gPFPk1ZwsQ7vXNmGw7JKHeYNYkUr+IMRfsB78/fO9zJxYesz1AVF1Ckl5G kJbO5IWNxjy4IApJ0qxuGJxY0mIvQ1rjcyCUq59ijUsCHXb4xJhw4Mp2NInW9akvhpWb gGVMoCuOaydmFu6KlUfDXW2zSjzIuxSGGxCGPAkUayi7uHfLVAOWICn2ChIwn5d3bIP+ 4/FQ== X-Gm-Message-State: AA+aEWZRrjpPZ82U8lDja6R7q3birBKewChz6gERK5+bt+lroLHTyBYQ iFWH7Md1CXH88upX6pgfNkM2aq8a X-Google-Smtp-Source: AFSGD/Xby2QnSrwl9NxGYOPIIf3Su5cMreaPkdabWGUPvI8ySiO0bhFPRSz6X2PbXVgFYirkmtsSrg== X-Received: by 2002:a7b:c156:: with SMTP id z22mr12115286wmi.24.1543930045477; Tue, 04 Dec 2018 05:27:25 -0800 (PST) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id h16sm24588523wrb.62.2018.12.04.05.27.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 05:27:24 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Derrick Stolee , Christian Couder , =?utf-8?b?w4Z2YXIgQXJuZmo=?= =?utf-8?b?w7Zyw7AgQmphcm1hc29u?= Subject: [PATCH 3/3] sha1-file: change alternate "error:" message to "warning:" Date: Tue, 4 Dec 2018 14:27:16 +0100 Message-Id: <20181204132716.19208-4-avarab@gmail.com> X-Mailer: git-send-email 2.20.0.rc2.403.gdbc3b29805 In-Reply-To: <87tvjtvah0.fsf@evledraar.gmail.com> References: <87tvjtvah0.fsf@evledraar.gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the "error" message emitted by alt_odb_usable() to be a "warning" instead. As noted in commits leading up to this one this has never impacted the exit code ever since the check was initially added in 26125f6b9b ("detect broken alternates.", 2006-02-22). It's confusing to emit an "error" when e.g. "git fsck" will exit with 0, so let's emit a "warning:" instead. Signed-off-by: Ævar Arnfjörð Bjarmason --- sha1-file.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sha1-file.c b/sha1-file.c index f142f81658..4b9b63bdcb 100644 --- a/sha1-file.c +++ b/sha1-file.c @@ -378,17 +378,17 @@ static int alt_odb_usable(struct raw_object_store *o, if (!is_directory(path->buf)) { /* Detect cases where alternate disappeared */ - error(_("object directory %s does not exist; " - "check .git/objects/info/alternates"), - path->buf); + warning(_("object directory %s does not exist; " + "check .git/objects/info/alternates"), + path->buf); return 0; } else if (is_directory(mkpath("%s/objects", path->buf)) || is_directory(mkpath("%s/.git/objects", path->buf))) { /* Detect cases where alternate is a git repository */ - error(_("object directory %s looks like a git repository; " - "alternates must point to the 'objects' directory. " - "check .git/objects/info/alternates"), - path->buf); + warning(_("object directory %s looks like a git repository; " + "alternates must point to the 'objects' directory. " + "check .git/objects/info/alternates"), + path->buf); return 0; }