From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id nvGjJ7ea52CPVwAAgWs5BA (envelope-from ) for ; Fri, 09 Jul 2021 02:39:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qNHCIrea52DpKgAAbx9fmQ (envelope-from ) for ; Fri, 09 Jul 2021 00:39:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BCD2017A32 for ; Fri, 9 Jul 2021 02:39:18 +0200 (CEST) Received: from localhost ([::1]:43810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1eXy-0000AU-HZ for larch@yhetil.org; Thu, 08 Jul 2021 20:39:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1eXm-00009y-Pa for guix-patches@gnu.org; Thu, 08 Jul 2021 20:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1eXm-00030D-I3 for guix-patches@gnu.org; Thu, 08 Jul 2021 20:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1eXm-00047j-CI for guix-patches@gnu.org; Thu, 08 Jul 2021 20:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49252] [PATCH] Channels defaulting to HEAD instead of =?UTF-8?Q?=E2=80=98master=E2=80=99?= Resent-From: Kyle Meyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jul 2021 00:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49252 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Ricardo Wurmus , 49252@debbugs.gnu.org Received: via spool by 49252-submit@debbugs.gnu.org id=B49252.162579113415836 (code B ref 49252); Fri, 09 Jul 2021 00:39:02 +0000 Received: (at 49252) by debbugs.gnu.org; 9 Jul 2021 00:38:54 +0000 Received: from localhost ([127.0.0.1]:57898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1eXd-00047M-SK for submit@debbugs.gnu.org; Thu, 08 Jul 2021 20:38:54 -0400 Received: from out2.migadu.com ([188.165.223.204]:12766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1eXa-00047A-2c for 49252@debbugs.gnu.org; Thu, 08 Jul 2021 20:38:52 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1625791128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TgcRn5+/bkHbfvnbGeIgDlquYPvEWMtbwGx5JF8YhSs=; b=dxFflbhf97NCb1R8m23sN4dx2450qWPl6E6kI+B7Emc5YKIF2t/SxlQToXGzrOsoZrpX9J x/VIWKml27gLvnCJcK3nqtLHNhiJvuwkb/kbNq7UlKHwnxJuz7q9hM0HVU12fMm+gCrGzO tpG/4N9ym5yIEj9WbnfpzkRi/K1YP805RU6MJNEyHrNp85YVIIZJGtyHBqBaiyD083QkKe Cevk6Pvb0ZbRv6+xrHavuJXXdwvdA5P7Yp02qSNl8Yp46OdyLZLUPKdMG6bQs7s/kKkf4z yi5yno6C7C9sbofrG5wk0qBfMJ6Slx1LXKav8TkLC26u9+YV7Og9xarY2OxTxA== From: Kyle Meyer In-Reply-To: <87y2auw3jo.fsf@inria.fr> References: <87y2auw3jo.fsf@inria.fr> Date: Thu, 08 Jul 2021 20:38:45 -0400 Message-ID: <87fswo8goa.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Auth-User: kyle@kyleam.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625791158; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=TgcRn5+/bkHbfvnbGeIgDlquYPvEWMtbwGx5JF8YhSs=; b=NNHdjl3DmBc9PaEN+P9xUoeJgNpHPDzVSUPZgpL0HRh6VEdbIN97mT02acWxTyBtH8rFDA QzwBDdR/6XZ/XOehs3GrT/7tvAwzoPtgYrvZu2C/XOlLTboMKpFiuWtgIO/Ne7UreqcMqO IvcnTPBivTm1cpfZJbhL7YDlpqMr9OMRTvZqsAGfUyzJWektdw5nKjNzYuKXuLNi5YA3Py JBymRarYbgfIOvEZxpzF9nIDgSpzIv1i9wnuiT5vVBY7oTsk3R3KQF8v3qb0HLOluDN0nm ClYZg/0zEGQvAdWh7cGNqBwNh5iAf+KASsChcTaEVyzQF4YYJ8LBkcu16Z6CjA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625791158; a=rsa-sha256; cv=none; b=WRPWl9sfI98Xl0hItARhXNQEl4tT5eqMS4WKpPRGc3IXEitK3DwZ+bAla83K0RoUsxuG0n jb2VUHU2q2plNU4SX7Rbo5QTcoiXo+j09XQN87sQKyd0TDUIMQu4eG/eOVDAiknIMQ6Lfv 31ipTYc+lUiiL0cY6wqTx4OMF9wYhcKtdzUqC6CwnYFNbu08t2DiTtCGDhzqFSHAdqDU+G W7vsSzoaDHMzov4Lc4Dzd0ckJzPDMOne963oFIKqKiSXDLVYeGJeQo1jS/69jAO8g1qmjG 0koOkHPd1MxCi0TIbuIb5sjunZq/8aOvXjfZ/B6XiN6IVgsZHCCS5kdWHl99fg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kyleam.com header.s=key1 header.b=dxFflbhf; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kyleam.com header.s=key1 header.b=dxFflbhf; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: BCD2017A32 X-Spam-Score: -1.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: O7Pz81HX2dtP Ludovic Court=C3=A8s writes: > For the record, commit cb41c15827a2e910aa56fb5d1917ba8a085c95c7 by Kyle > (Cc=E2=80=99d) gives the ability to use the remote HEAD by default, which= is > exactly what we need here. > > Unfortunately, for the Guix repo at Savannah, I get: > > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix time-machine -- describe > guix time-machine: error: Git error: reference 'refs/remotes/origin/HEAD'= not found > --8<---------------cut here---------------end--------------->8--- > > =E2=80=A6 but it works for . > > Presumably we have a server-side setup issue at Savannah? Hmm, it looks like it's there: $ git ls-remote https://git.savannah.gnu.org/git/guix.git | grep HEAD e499500730de23fd54ae63696a725d4b90a406d7 HEAD $ git clone https://git.savannah.gnu.org/git/guix.git && cd guix $ git for-each-ref refs/remotes/origin | grep HEAD e499500730de23fd54ae63696a725d4b90a406d7 commit refs/remotes/origin/HEAD $ git name-rev refs/remotes/origin/HEAD refs/remotes/origin/HEAD master This might be a long shot, but if you cloned the repo with magit-clone, it has some custom logic that deletes refs/remotes//HEAD unless magit-clone-set-remote-head is non-nil (and it's nil by default). > Are there downsides, or cases where it might pick the wrong branch? The main downside I can think of is what I mentioned in bug#45187 (87v9d8dk0r.fsf@kyleam.com): [The remote HEAD symref] probably the best indicator of what the primary branch is. In a clone, it doesn't necessarily match HEAD on the remote, because users may change it to another branch they're interested in, but that isn't really relevant to these behind-the-scenes checkouts. So, if it's a user-facing clone, refs/remotes/origin/HEAD isn't a reliable indicator because users are free to redirect the remote HEAD symref to another branch of interest [*] or to delete it altogether. I think channel clones would fall into the "behind the scenes" category, though, right? [*] This is discussed here: https://lore.kernel.org/git/xmqqlfivwvtw.fsf@gitster.c.googlers.com/