git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [1.8.0] git checkout refs/heads/foo checks out branch foo
@ 2011-02-07 11:01 Martin von Zweigbergk
  2011-02-07 20:53 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Martin von Zweigbergk @ 2011-02-07 11:01 UTC (permalink / raw)
  To: git

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. This is quite counter-intuitive (at least to me) and the same
functionality can be achieved by using e.g. foo~0. Change the behavior
so that the branch is actually checked out. This also applies to
e.g. 'git rebase master refs/heads/topic', which currently rebases a
detached HEAD. There are probably other examples as well that I'm not
aware of.


Risks:

Existing scripts may depend on the current behavior. It seems unlikely
that many users depend on it. Most likely, they use foo~0 or foo^0
instead.


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.

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

end of thread, other threads:[~2011-02-08 10:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 11:01 [1.8.0] git checkout refs/heads/foo checks out branch foo Martin von Zweigbergk
2011-02-07 20:53 ` Junio C Hamano
2011-02-07 20:59 ` Jeff King
2011-02-07 21:36   ` Sverre Rabbelier
2011-02-07 22:00     ` Jonathan Nieder
2011-02-07 23:37       ` Junio C Hamano
2011-02-07 23:45         ` Jeff King
2011-02-08  0:01           ` Jonathan Nieder
2011-02-08  0:28             ` Jeff King
2011-02-08  0:31           ` Martin von Zweigbergk
2011-02-08  0:52           ` [PATCH/WIP] checkout: introduce --detach synonym for "git checkout foo^{commit}" Jonathan Nieder
2011-02-08  0:55             ` Jonathan Nieder
2011-02-08 10:26             ` [PATCH v2 0/3] " Jonathan Nieder
2011-02-08 10:29               ` [PATCH 1/3] checkout: split off a function to peel away branchname arg Jonathan Nieder
2011-02-08 10:32               ` [PATCH 2/3] checkout: introduce --detach synonym for "git checkout foo^{commit}" Jonathan Nieder
2011-02-08 10:34               ` [PATCH 3/3] checkout: rearrange update_refs_for_switch for clarity Jonathan Nieder
2011-02-07 21:11 ` [1.8.0] git checkout refs/heads/foo checks out branch foo Heiko Voigt
2011-02-08  0:22   ` Martin von Zweigbergk

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).