git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Should "git symbolic-ref -d HEAD" be forbidden?
@ 2016-09-01 21:08 Junio C Hamano
  2016-09-01 21:19 ` Jeff King
  2016-09-02  9:19 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2016-09-01 21:08 UTC (permalink / raw)
  To: git

I think we should.

t1401 expects to be able to, but if you really do it:

	$ cd /tmp
	$ git init throwaway
        $ cd throwaway
        $ git symbolic-ref -d HEAD

the setup machinery considers that you are no longer in a working
tree that is controlled by a repository at .git/ because .git/ is
no longer a valid repository, so you cannot even do

	$ git symbolic-ref HEAD refs/heads/master

to recover.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-02  9:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-01 21:08 Should "git symbolic-ref -d HEAD" be forbidden? Junio C Hamano
2016-09-01 21:19 ` Jeff King
2016-09-01 22:31   ` Junio C Hamano
2016-09-02  0:55     ` Jeff King
2016-09-02  9:19 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).