From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id DFF3A3858004 for ; Thu, 14 Oct 2021 09:07:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DFF3A3858004 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: g/sPuhxkyQK6jG3E5YTll4t5cb4U0D4HfiEHzK3GvmdpZivMUFmMVnUERkBaYvaPqcaURd/q1H OixcNVqX2rFJCu4RZeMbpOTcQFklOvYsuvnNYOjPAp/+pJCsx+Tt1aqH6VuPmcnYKYLW6FZFmA +Q/5rhL0vFQVSBq/QhiUtKwtNMQiEVoQctoZzB0UIJRFpRN6z1V1xQQoFm3bTl1y2mAw2n04YT KUhwRZi+9UVaIbLybLui5susTZCwKwqjYf/ueb3g1dRa7W8m6nf3ueEdtF0YJpOEoj3iiRw80T ac8Wb3327mYNF+V+8456O42f X-IronPort-AV: E=Sophos;i="5.85,372,1624348800"; d="scan'208";a="69650486" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 14 Oct 2021 01:07:03 -0800 IronPort-SDR: XvvUWdy3UyYUwiO1J7zdxpRrdFqJ1dq5obvFVEC4Pzquu5V17aCvaf9v0yKDXh8EUFWfdBtuU7 2YKrcjW/YTByJ11ZCEaQ5z0rv/Biu/dZgBVH+sFKmxMcFrHWi7+vZpxi9fmUuFa2uBOvGsTSff qLK0Ldm7DBX2oqtHKnHPHN8mH0eMGYF8jDTdRFuy8P72dgZasbMMOXLP7Guko4ettxdZzACQfd DHw7yXPWu8q4vWLY8PtD5QFpkYouo0nh31QmqB6jOUizIU29z1usUMYRmADW34rHJyyc31rDv8 qmA= Message-ID: <846ffa97-c2c4-2dd4-9d02-ed6db5d1ffa7@codesourcery.com> Date: Thu, 14 Oct 2021 11:06:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [RFC] Port git gcc-descr to Python Content-Language: en-US To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , Jakub Jelinek CC: Jonathan Wakely , References: <7e803eb3-d9df-99de-490d-823c1ffe29d7@suse.cz> <20211008111246.GF304296@tucnak> <11400b93-b2bb-6133-88f7-20219433f2a7@suse.cz> <12d44ac0-8849-466c-9749-b4e1e7168ac7@suse.cz> From: Tobias Burnus In-Reply-To: <12d44ac0-8849-466c-9749-b4e1e7168ac7@suse.cz> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2021 09:07:04 -0000 Hi Martin, On 12.10.21 10:59, Martin Li=C5=A1ka wrote: > There's a complete patch that implements both git gcc-descr and > gcc-undesrc > and sets corresponding git aliases to use them. When invoking ./contrib/git-describe.py directly, I get the error: fatal: Not a valid object name /master I think you need something like: - upstream =3D r.stdout.strip() if r.returncode else 'origin' + upstream =3D r.stdout.strip() if r.returncode =3D=3D 0 else 'origin' * * * Additionally, I observe the following (independent of the conversion): For 7433458d871f6bfe2169b9d7d04fec64bb142924, I get: r0-80854-g7433458d871f6b The question is whether we are happy that only reversions since basepoints/gcc-5 have a version number or whether we want to use releases/gcc-x.y.0 -> x.y as fallback when basepoint does not exist or back-added more basepoints? Admittedly, this will add '.', thus, maybe the answer is 'no'? Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955