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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id AC6481F5AE for ; Tue, 18 May 2021 06:56:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346887AbhERG5P (ORCPT ); Tue, 18 May 2021 02:57:15 -0400 Received: from cloud.peff.net ([104.130.231.41]:57396 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235627AbhERG5O (ORCPT ); Tue, 18 May 2021 02:57:14 -0400 Received: (qmail 10947 invoked by uid 109); 18 May 2021 06:55:56 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 18 May 2021 06:55:56 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 5213 invoked by uid 111); 18 May 2021 06:55:58 -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; Tue, 18 May 2021 02:55:58 -0400 Authentication-Results: peff.net; auth=none Date: Tue, 18 May 2021 02:55:55 -0400 From: Jeff King To: Felipe Contreras Cc: Junio C Hamano , git@vger.kernel.org, =?utf-8?B?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy , Richard Hansen Subject: Re: Re* [PATCH] doc: glossary: add entry for revision range Message-ID: References: <20210516203736.1098072-1-felipe.contreras@gmail.com> <60a245a927c62_126333208ea@natae.notmuch> <60a2daa57d8a6_13c370208f3@natae.notmuch> <60a34a7616cda_14d1bc20818@natae.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <60a34a7616cda_14d1bc20818@natae.notmuch> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, May 18, 2021 at 12:02:46AM -0500, Felipe Contreras wrote: > > Why would people need to use "git remote set-head" most of the time? The > > symlink is set up properly by git-clone, and has been for many years. > > First instructions from GitHub: > > echo "# test" >> README.md > git init > git add README.md > git commit -m "first commit" > git branch -M main > git remote add origin git@github.com:felipec/test.git > git push -u origin main > > Second instructions from GitHub: > > git remote add origin git@github.com:felipec/test.git > git branch -M main > git push -u origin main > > None of these use `git clone`. So? Here are some other instructions from GitHub[0]: Type git clone, and then paste the URL you copied earlier. $ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY [0] https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository Not to mention that every single repository page mentions cloning under the "Code" button (including the command-line "gh repo clone" if you are using their recommended tool). People clone a lot more than they create new repositories. > Of 31 repositories I work on and have quickly at hand only 8 have > origin/HEAD. And of 141 repositories I have on my workstation, 137 have origin/HEAD (and of the 4 without, one does not even have a remote at all, and one is a git-svn repository). I don't think that proves anything except that your workflow is different than mine. But I contend that most people get repositories by cloning them. > And even *if* origin/HEAD did work on most repositories (hardly the > case), most people are not going to train their fingers to type `git cmd > $x` when the only $x where the command works is "origin"; they would > rather train their fingers to do $x/master which works on many more > repositories. I guess I'm not most people, because I sure have enjoyed typing the shorter thing all these years. Look, I get that you didn't know or care about the "origin/HEAD" feature until recently. But it's been part of Git for over 15 years, and has been used as the documentation examples for revision ranges in both git-rev-list(1) and gitrevisions(7), as well as the user-manual. I'm perfectly happy to use placeholder ref names in the glossary documentation, but it's not like the use of "origin" as a name is some obscure secret. -Peff