Marcin Owsiany <marcin@xxxxxxxxxx> writes: >> 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? >> 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 > :-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html