git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug: branch checkout is detached if the case doesn't match
@ 2021-06-20 19:45 Tim Hutt
  2021-06-20 22:03 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Hutt @ 2021-06-20 19:45 UTC (permalink / raw)
  To: git

If you try to switch to a branch (e.g. `master`), but get the case wrong, e.g:

    git switch MASTER
    git checkout MASTER
    git switch Master
    git checkout Master

etc. then it autocorrects the case (bad idea but ok), but it also
enables the `--detach` flag! In other words

    git switch Master

acts like

    git switch -d master

Very unexpected!

Cheers,

Tim

[System Info]
git version:
git version 2.32.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Darwin 20.4.0 Darwin Kernel Version 20.4.0: Fri Mar  5 01:14:14
PST 2021; root:xnu-7195.101.1~3/RELEASE_X86_64 x86_64
compiler info: clang: 12.0.5 (clang-1205.0.22.9)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh

[Enabled Hooks]

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

end of thread, other threads:[~2021-06-23 13:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-20 19:45 Bug: branch checkout is detached if the case doesn't match Tim Hutt
2021-06-20 22:03 ` Ævar Arnfjörð Bjarmason
2021-06-21 17:20   ` Tim Hutt
2021-06-23  2:38     ` brian m. carlson
2021-06-23 11:00       ` Tim Hutt
2021-06-23 13:00       ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).