Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git List Mailing <git@vger.kernel.org>
Subject: Re: "git symbolic-ref" doesn't do a very good job
Date: Sat, 30 Jul 2022 13:38:37 -0700	[thread overview]
Message-ID: <xmqqtu6y1gky.fsf@gitster.g> (raw)
In-Reply-To: <CAHk-=wg9LaHeg0UmZ90gLOaBpO-5fhoaH22iNNm=1eror95pFg@mail.gmail.com> (Linus Torvalds's message of "Sat, 30 Jul 2022 13:21:50 -0700")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> t3200-branch.sh does
>
>       git symbolic-ref refs/heads/dangling-symref nowhere
>
> which really depends on that whole "git symbolic-ref does no sanity
> checking at all".

Yeah, once in the past, I thought

    git symbolic-ref refs/heads/main master

might be a way to adjust to the new world order without having me to
change my workflow.  I can always update master, and main follows it
without me being aware of it even being there. 

But it did not work.  Even worse, after doing so, running

    git update-ref refs/heads/main master

created ".git/master", which was a disaster.  Of course

    git symbolic-ref refs/heads/main refs/heads/master

would have worked.

I am not sure what workflow the "nowhere" thing is supposed to help.
Of course, with s/nowhere/HEAD/, it is a perfectly sane repository
immediately after "git init -b nowhere", so whatever tightening we
do, we should make sure that

    git symbolic-ref refs/heads/main HEAD

keeps working.

  reply	other threads:[~2022-07-30 20:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 19:53 "git symbolic-ref" doesn't do a very good job Linus Torvalds
2022-07-30 20:21 ` Linus Torvalds
2022-07-30 20:38   ` Junio C Hamano [this message]
2022-07-31  0:18   ` Jeff King
2022-07-31  0:24     ` Jeff King
2022-07-31  0:44       ` Linus Torvalds
2022-08-01 17:43         ` Jeff King
2022-08-01 17:46           ` Jeff King
2022-08-01 18:15           ` Jeff King
2022-08-01 18:54             ` Junio C Hamano
2022-08-02  0:46               ` Jeff King
2022-08-02  0:57                 ` Junio C Hamano
2022-08-01 19:00             ` Linus Torvalds
2022-07-31 19:10     ` Junio C Hamano
2022-08-01 17:36       ` Jeff King
2022-08-01 17:49         ` Linus Torvalds
2022-08-01 18:04           ` Jeff King

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=xmqqtu6y1gky.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox