From: Tim Hutt <tdhutt@gmail.com>
To: git@vger.kernel.org
Subject: Bug: branch checkout is detached if the case doesn't match
Date: Sun, 20 Jun 2021 20:45:35 +0100 [thread overview]
Message-ID: <CAKuVd4DfvEhXDUvxaU_jjNk8JSZANM8jpSEOxi1cbSAp23ohjg@mail.gmail.com> (raw)
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]
next reply other threads:[~2021-06-20 19:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-20 19:45 Tim Hutt [this message]
2021-06-20 22:03 ` Bug: branch checkout is detached if the case doesn't match Æ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
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=CAKuVd4DfvEhXDUvxaU_jjNk8JSZANM8jpSEOxi1cbSAp23ohjg@mail.gmail.com \
--to=tdhutt@gmail.com \
--cc=git@vger.kernel.org \
/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).