Re: [1.8.0] git checkout refs/heads/foo checks out branch foo
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 7, 2011, 20:53 UTC
- Message-ID
- <7vwrlbtvm0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.10.1102062234010.3788@debian>
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:
Show 5 quoted lines
> Proposal: > > 'git checkout refs/heads/foo' (or 'git checkout heads/foo' for that > matter) does not check out the branch, but instead detaches HEAD at > foo.
Yes, and it is deliberately so as it is a guaranteed-sure way for scripts to work around potential ref ambiguity when talking about the branch called 'foo' to spell it out with leading refs/heads/.
As long as you do not break scripts that guard against breakage you are proposing by saying "refs/heads/foo^0", we are Ok with the proposal, I think.
Show 5 quoted lines
> Migration plan: > > Make 'git checkout refs/head/foo' emit a warning in the next 1.7.x > explaining that its semantics will change in 1.8.0. Then change the > behavior in 1.8.0 and remove the warning.
Reasonable.
Thanks.