All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Richard Hansen" <rhansen@rhansen.org>
Subject: Re: Re* [PATCH] doc: glossary: add entry for revision range
Date: Tue, 18 May 2021 02:55:55 -0400	[thread overview]
Message-ID: <YKNk+5k3hKW/xPBZ@coredump.intra.peff.net> (raw)
In-Reply-To: <60a34a7616cda_14d1bc20818@natae.notmuch>

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

  reply	other threads:[~2021-05-18  6:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 20:37 [PATCH] doc: glossary: add entry for revision range Felipe Contreras
2021-05-17  7:46 ` Re* " Junio C Hamano
2021-05-17 10:30   ` Felipe Contreras
2021-05-17 11:55     ` Jeff King
2021-05-17 17:22       ` Felipe Contreras
2021-05-18  6:59         ` Jeff King
2021-05-18 12:28           ` Felipe Contreras
2021-05-17 19:26       ` Junio C Hamano
2021-05-17 21:05         ` Felipe Contreras
2021-05-18  0:51           ` Junio C Hamano
2021-05-18  1:26             ` Felipe Contreras
2021-05-18  2:08           ` Jeff King
2021-05-18  2:57             ` Junio C Hamano
2021-05-18  5:20               ` Felipe Contreras
2021-05-18  5:02             ` Felipe Contreras
2021-05-18  6:55               ` Jeff King [this message]
2021-05-18 11:42                 ` Felipe Contreras
2021-05-18 12:47                   ` Jeff King
2021-05-18 21:09                     ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKNk+5k3hKW/xPBZ@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=rhansen@rhansen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.