Git development
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: "Junio C Hamano" <gitster@pobox.com>,
	"Thibaud CANALE" <thican@thican.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] switch: provide configurable detach
Date: Mon, 06 Apr 2026 19:48:49 +0200	[thread overview]
Message-ID: <f0276575-9c75-45fb-8fcc-b465619d1b97@app.fastmail.com> (raw)
In-Reply-To: <xmqq7bqkcah8.fsf@gitster.g>

On Mon, Apr 6, 2026, at 18:36, Junio C Hamano wrote:
> Thibaud CANALE <thican@thican.net> writes:
>>[snip]
>>  3 files changed, 46 insertions(+), 3 deletions(-)
>
> Sorry, but I am fairly negative on this change.
>
>[snip]
>
> FWIW, "git checkout" that knows what is and what is not a branch
> name and does not require "--detach" when detaching to anything that
> is not a branch name is always available and will not be going away.

On the one hand, I personally mostly use git-checkout(1) because I never
use it to check out files and I like the detach behavior. So from that
perspective I don’t understand Git users who interject when you provide
examples for something and you (incidental to the example and point) use
git-checkout(1) because that’s what you are used to. And they interject
because git-checkout(1) is “obsolete” or something and you are setting a
bad example (or something).

On the other hand, the BreakingChanges document does call
git-checkout(1) “superseded”.  And in that light I do understand why
people want to actively avoid git-checkout(1), including implementing
replacements for all relevant checkout-use cases in git-switch(1).

    Superseded features that will not be deprecated

    [...]

    • The features git-checkout(1) offers are covered by the pair of
      commands git-restore(1) and git-switch(1). Because the use of
      git-checkout(1) is still widespread, and it is not expected that
      this will change anytime soon, all three commands will stay.

https://git-scm.com/docs/BreakingChanges

  reply	other threads:[~2026-04-06 17:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-04 14:28 [RFC PATCH] switch: provide configurable detach Thibaud CANALE
2026-04-04 15:23 ` Pablo
2026-04-04 21:10   ` Thibaud CANALE
2026-04-04 16:58 ` D. Ben Knoble
2026-04-04 21:26   ` Thibaud CANALE
2026-04-04 21:14 ` [RFC PATCH v2] " Thibaud CANALE
2026-04-06 16:36 ` [RFC PATCH] " Junio C Hamano
2026-04-06 17:48   ` Kristoffer Haugsbakk [this message]
2026-04-07  0:50     ` Junio C Hamano

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=f0276575-9c75-45fb-8fcc-b465619d1b97@app.fastmail.com \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=thican@thican.net \
    /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