git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Inconsistent behavior of the path disambiguator
@ 2010-10-29 18:11 Dun Peal
  2010-10-29 18:38 ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: Dun Peal @ 2010-10-29 18:11 UTC (permalink / raw)
  To: git

Hi.

When I clone a remote that has a branch `foo`, then `git checkout foo
--`, the path disamgiuator makes the operation fail. `git checkout
foo` without the disambiguator works. Following that, when branch
`foo` already exists, `git checkout foo --` works even with the
disambiguator that caused it to fail previously.

Here's a log demonstrating a full reproduction of the bug with git
1.7.2 on Linux:

=== LOG START ===

$ mkdir origin && cd origin && git init && echo 1 >> test.txt && git
add test.txt && git commit -am "First." && git branch foo
Initialized empty Git repository in /home/afine/lab/gitexp/origin/origin/.git/
[master (root-commit) 6042525] First.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 test.txt
$ cd .. && git clone origin local && cd local
Cloning into local...
done.
$ git checkout foo --
fatal: invalid reference: foo
$ git checkout foo
Branch foo set up to track remote branch foo from origin.
Switched to a new branch 'foo'
$ git checkout master
Switched to branch 'master'
$ git checkout foo --
Switched to branch 'foo'

=== LOG END ===

This looks like a bug.

Thanks, D

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

end of thread, other threads:[~2010-10-31  3:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29 18:11 Inconsistent behavior of the path disambiguator Dun Peal
2010-10-29 18:38 ` Junio C Hamano
2010-10-29 18:54   ` Dun Peal
2010-10-29 20:19     ` Re* " Junio C Hamano
2010-10-29 19:46   ` Jonathan Nieder
2010-10-29 20:25     ` Junio C Hamano
2010-10-29 23:53       ` [PATCH v2] checkout: apply Dscho's dwim even with "--" present Jonathan Nieder
2010-10-29 23:59         ` Jonathan Nieder
2010-10-30  0:41         ` Jonathan Nieder
2010-10-31  3:57           ` Junio C Hamano

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).