git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
	git@vger.kernel.org
Subject: [PATCH v2 0/3] checkout: introduce --detach synonym for "git checkout foo^{commit}"
Date: Tue, 8 Feb 2011 04:26:05 -0600	[thread overview]
Message-ID: <20110208102605.GA29660@elie> (raw)
In-Reply-To: <20110208005238.GB24340@elie>

Jonathan Nieder wrote:

> Two of the new tests fail. :)

... and here's a reroll fixing them.  Applies on top of the old
uk/checkout-ambiguous-ref (0cb6ad3, 2011-01-11).

Patch 1 is an irrelevant cleanup, for while I have your eyes on this
code. :)

Patch 2 introduces the --detach option, taking care to error out in
special cases.

Patch 3 is another cleanup, to make the effect of patch 2 more clear.

Thanks again for your help.
Jonathan Nieder (2):
  checkout: split off a function to peel away branchname arg
  checkout: rearrange update_refs_for_switch for clarity

Junio C Hamano (1):
  checkout: introduce --detach synonym for "git checkout foo^{commit}"

 Documentation/git-checkout.txt |   13 ++-
 builtin/checkout.c             |  265 +++++++++++++++++++++++----------------
 t/t2020-checkout-detach.sh     |   95 ++++++++++++++
 3 files changed, 262 insertions(+), 111 deletions(-)
 create mode 100755 t/t2020-checkout-detach.sh

  parent reply	other threads:[~2011-02-08 10:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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             ` Jonathan Nieder [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110208102605.GA29660@elie \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.von.zweigbergk@gmail.com \
    --cc=peff@peff.net \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).