Re: [PATCH/RFC] git-svn: don't create master if another head exists
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2012, 17:01 UTC
- Message-ID
- <7vehp3gwbx.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120625075726.GO3125@beczulka>
Marcin Owsiany <marcin@owsiany.pl> writes:
Show 5 quoted lines
>> What are you really trying >> to validate? "HEAD" points at an existing branch and you do not >> care what branch it is? > > Yes. I think.
Why do you even care about the value of HEAD, i.e. the output from "rev-parse HEAD", if that is the case? Wouldn't you rather be reading from the output "symbolic-ref HEAD" to see if it points at any branch?
Show 7 quoted lines
>> HEAD may not even point at a valid branch >> but can be detached as long as it happens to point at a commit that >> is at the tip of some branch (hence building further commit on HEAD >> will break the condition you are checking in the above code)? > > The more questions you ask, the less I feel I know about how git works > :-)