Code

checkout: introduce --detach synonym for "git checkout foo^{commit}"
authorJunio C Hamano <gitster@pobox.com>
Tue, 8 Feb 2011 10:32:49 +0000 (04:32 -0600)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Feb 2011 19:14:26 +0000 (11:14 -0800)
commit32669671c7746888aa1e3832907deb7fc8405061
tree220c9c720a79dab724e328a9fab9737592f5f3df
parent09ebad6faeec11c3dbad0bdaf95faed57be5dcba
checkout: introduce --detach synonym for "git checkout foo^{commit}"

For example, one might use this when making a temporary merge to
test that two topics work well together.

Patch by Junio, with tests from Jeff King.

[jn: with some extra checks for bogus commandline usage]

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-checkout.txt
builtin/checkout.c
t/t2020-checkout-detach.sh [new file with mode: 0755]