From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id E63621F45E for ; Fri, 14 Feb 2020 06:53:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728807AbgBNGxy (ORCPT ); Fri, 14 Feb 2020 01:53:54 -0500 Received: from cloud.peff.net ([104.130.231.41]:43220 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725845AbgBNGxx (ORCPT ); Fri, 14 Feb 2020 01:53:53 -0500 Received: (qmail 19464 invoked by uid 109); 14 Feb 2020 06:53:53 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Fri, 14 Feb 2020 06:53:53 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 19391 invoked by uid 111); 14 Feb 2020 07:02:50 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 14 Feb 2020 02:02:50 -0500 Authentication-Results: peff.net; auth=none Date: Fri, 14 Feb 2020 01:53:52 -0500 From: Jeff King To: Matheus Tavares Bernardino Cc: Roland Hieber , git Subject: Re: git-describe --tags warning: 'X' is really 'Y' here Message-ID: <20200214065352.GG605125@coredump.intra.peff.net> References: <20200205141332.lov2f2fvinehcd3a@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Feb 05, 2020 at 02:15:07PM -0300, Matheus Tavares Bernardino wrote: > > I'm working with the GCC Git repo [0] (which was apparently recently > > converted from SVN [1]), and I'm trying to find out the most recent tag. > > So on the master branch I do: > > > > gcc (master) $ git describe --tags --abbrev=0 > > warning: tag 'gcc_9_2_0_release' is really 'releases/gcc-9.2.0' here > > gcc_9_2_0_release > > > > It took me a while to find out what the warning means, because > > 'gcc_9_2_0_release' is not in $(git tag -l), and it cannot be used as a > > ref either: > [...] > It seems that the commit which added the output message you got is > 212945d ("Teach git-describe to verify annotated tag names before > output", 2008-02-28) [1]. As the commit message states, the warning is > emitted when a tag is locally stored under a different name from the > one it was originally created (being the former the one you will want > to use at `git show`). Yeah, I think that is what's going on with that warning, but there's a weird thing about the actual stdout output. We see a tag object whose name doesn't match the ref. What's the "real" name of that tag? Is it the name in the object, and the ref is wrong? Or is the ref correct, and the object is wrong? You could get pretty philosophical there, I think, but it seems slightly annoying that we print the name from the object to stdout, when one cannot then use that name to access the tag in any way. I.e., I think it might be reasonable to issue that warning but then print "releases/gcc-9.2.0" instead. -Peff