From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Jona Christopher Sahnwaldt <jc@sahnwaldt.de>
Cc: David Aguilar <davvid@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: "git checkout foo" is getting confused by folder named "foo"
Date: Wed, 25 Sep 2013 22:01:00 +0200 [thread overview]
Message-ID: <vpqzjr0oemb.fsf@anie.imag.fr> (raw)
In-Reply-To: <CAEQewpoRhGGnc7HMES1nNbduiRP-qLF4hKBJhRKy7CjMzXnGNg@mail.gmail.com> (Jona Christopher Sahnwaldt's message of "Wed, 25 Sep 2013 21:36:52 +0200")
Jona Christopher Sahnwaldt <jc@sahnwaldt.de> writes:
> Yes, I think the rules for the "short form" (the guessing when there's
> no --) should be made simpler, or maybe the guessing should be dropped
> altogether. I don't know. I don't know git well enough to be able to
> be more specific. I just find the current behavior very confusing.
It can hardly be "simpler" (in the sense "behavior that can be described
with fewer words"), but it could be tightened to be safer.
When a remote branch $foo exists, a local branch $foo does not, and a
file $foo does, then
git checkout $foo
rather likely means "I want to use git checkout's DWIM and create local
branch $foo", but it currently means to Git "checkout file foo from the
index". It would make sense to die here, and require the use of --.
No time to write a patch for this. Any volunteer?
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2013-09-25 20:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-24 21:07 "git checkout foo" is getting confused by folder named "foo" Jona Christopher Sahnwaldt
2013-09-25 2:51 ` David Aguilar
2013-09-25 3:13 ` Keshav Kini
2013-09-25 3:33 ` Duy Nguyen
2013-09-25 8:58 ` Jona Christopher Sahnwaldt
2013-09-25 13:09 ` Matthieu Moy
2013-09-25 16:24 ` Jona Christopher Sahnwaldt
2013-09-25 19:12 ` Matthieu Moy
2013-09-25 19:36 ` Jona Christopher Sahnwaldt
2013-09-25 20:01 ` Matthieu Moy [this message]
2013-09-26 21:25 ` Jona Christopher Sahnwaldt
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=vpqzjr0oemb.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=jc@sahnwaldt.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.