Re: Should "git symbolic-ref -d HEAD" be forbidden?

2016-09-01 Thread Jeff King
On Thu, Sep 01, 2016 at 03:31:28PM -0700, Junio C Hamano wrote: > -- >8 -- > Subject: symbolic-ref -d: do not allow removal of HEAD > > If you delete the symbolic-ref HEAD from a repository, Git no longer > considers it valid, and even "git symbolic-ref HEAD refs/heads/master" > would not be

Re: Should "git symbolic-ref -d HEAD" be forbidden?

2016-09-01 Thread Junio C Hamano
Jeff King writes: > On Thu, Sep 01, 2016 at 02:08:08PM -0700, Junio C Hamano wrote: > >> 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

Re: Should "git symbolic-ref -d HEAD" be forbidden?

2016-09-01 Thread Jeff King
On Thu, Sep 01, 2016 at 02:08:08PM -0700, Junio C Hamano wrote: > 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