From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17918 invoked from network); 5 Jan 2021 11:53:24 -0000 Received: from krantz.zx2c4.com (192.95.5.69) by inbox.vuxu.org with ESMTPUTF8; 5 Jan 2021 11:53:24 -0000 Received: by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id f5fc1e55; Tue, 5 Jan 2021 11:42:23 +0000 (UTC) Return-Path: Received: from mail.thenautilus.net (mail.thenautilus.net [5.79.87.27]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id e6ce473c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 5 Jan 2021 11:42:21 +0000 (UTC) Received: (qmail 24298 invoked from network); 5 Jan 2021 11:53:04 -0000 Received: from unknown (HELO nautilus) (dakkar@::ffff:81.2.107.215) by 0 with ESMTPA; 5 Jan 2021 11:53:04 -0000 Date: Tue, 5 Jan 2021 11:53:03 +0000 From: Gianni Ceccarelli To: cgit@lists.zx2c4.com Subject: Re: [PATCH] Handle tags outside of refs/tags gracefully. Message-ID: <20210105115303.2cc704f9@nautilus> In-Reply-To: <20201229203309.33f1fcae@thenautilus.net> References: <20201228133550.67945-1-uqs@FreeBSD.org> <20201229203309.33f1fcae@thenautilus.net> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" I have found an annoying case=E2=80=A6 In the repository created as per my previous message, I did:: $ git tag -a foo $ git rev-parse refs/tags/foo > .git/refs/weird/annotated $ git push origin refs/weird/*:refs/weird/* This creates an "annotated tag", which is an object in the store, not just a reference. Now CGit shows the ``refs/weird/annotated`` as a tag in https://www.thenautilus.net/cgit/example/ and several other views, but following that link goes to https://www.thenautilus.net/cgit/example/tag/?h=3Drefs/weird/annotated which says "bad tag reference" I hope you'll concur this is not the best behaviour. I see several ways to "fix" this: * in all the various views, don't show links to annotated tags whose ref is outside of ``refs/tags/`` * in ``/tag``, try ``refs/tags/$h`` first, and if that doesn't work, try ``$h``, and show that only if it's an annotated tag (not just a reference) * create another endpoint (``/atag``?) to show tag objects, and link to that one for annotated tags whose ref is outside of ``refs/tags/`` --=20 Dakkar - GPG public key fingerprint =3D A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id =3D 0x75193F88