From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 07F8A207F8 for ; Wed, 3 May 2017 15:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752089AbdECPWO (ORCPT ); Wed, 3 May 2017 11:22:14 -0400 Received: from mout.gmx.net ([212.227.15.18]:51768 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbdECPWO (ORCPT ); Wed, 3 May 2017 11:22:14 -0400 Received: from virtualbox ([37.201.193.73]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MaIsi-1dLH7u2u1w-00JvoP; Wed, 03 May 2017 17:22:06 +0200 Date: Wed, 3 May 2017 17:22:04 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: =?UTF-8?Q?Nguy=E1=BB=85n_Th=C3=A1i_Ng=E1=BB=8Dc_Duy?= cc: git@vger.kernel.org, Junio C Hamano , Jeff King , Johannes Sixt Subject: Re: [PATCH v2 13/21] remote.c: report error on failure to fopen() In-Reply-To: <20170503101706.9223-14-pclouds@gmail.com> Message-ID: References: <20170420112609.26089-1-pclouds@gmail.com> <20170503101706.9223-1-pclouds@gmail.com> <20170503101706.9223-14-pclouds@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY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ySMrM0a32j3fIiEvlavkGKpcpd7YULOQnK6zWrLIQTThEAk5AoFgQu rwvENrK Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-70922210-1493824926=:3480 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Hi Duy, On Wed, 3 May 2017, Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy wrote: > There's plenty of error() in this code to safely assume --quiet is not a > concern. >=20 > t5512 needs update because if we check the path 'refs*master' (i.e. the > asterisk is part of the path) then we'll get an EINVAL error. So the first change in this patch unmasks a bug that is fixed by the second patch? > diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh > index 94fc9be9ce..02106c9226 100755 > --- a/t/t5512-ls-remote.sh > +++ b/t/t5512-ls-remote.sh > @@ -85,8 +85,15 @@ test_expect_success 'use branch..remote if possi= ble' ' > ' > =20 > test_expect_success 'confuses pattern as remote when no remote specified= ' ' > -=09cat >exp <<-\EOF && > -=09fatal: '\''refs*master'\'' does not appear to be a git repository > +=09if test_have_prereq MINGW > +=09then > +=09=09# Windows does not like asterisks in pathname > +=09=09does_not_exist=3Dmaster > +=09else > +=09=09does_not_exist=3D"refs*master" > +=09fi && > +=09cat >exp <<-EOF && > +=09fatal: '\''$does_not_exist'\'' does not appear to be a git repository > =09fatal: Could not read from remote repository. > =20 > =09Please make sure you have the correct access rights > @@ -98,7 +105,7 @@ test_expect_success 'confuses pattern as remote when n= o remote specified' ' > =09# fetch . > =09# We could just as easily have used "master"; the "*" emphasizes its > =09# role as a pattern. > -=09test_must_fail git ls-remote refs*master >actual 2>&1 && > +=09test_must_fail git ls-remote "$does_not_exist" >actual 2>&1 && > =09test_i18ncmp exp actual > ' Sure enough. This totally looks like it needs to be a preparatory bug fix. Please separate it out and make sure that it comes before the fopen_or_warn() change in the patch series. Ciao, Dscho --8323329-70922210-1493824926=:3480--