git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Inconsistent behavior of the path disambiguator

From
Dun Peal <dunpealer@gmail.com>
Date
Oct 29, 2010, 18:54 UTC
Message-ID
<AANLkTikc+pBe31j9tA88HwGz2kBouW_0S9oU6PtSQEzj@mail.gmail.com>
In-Reply-To
<7vbp6c7ski.fsf@alter.siamese.dyndns.org>
On Fri, Oct 29, 2010 at 7:38 PM, Junio C Hamano <gitster@pobox.com> wrote:
> I do not think there is any bug.  You were being bitten by folks who tried
> to be helpful for newbies by introducing a(n arguably confusing) special
> case; I can see why this is confusing, though.
Thanks.

We just switched to Git, and our developers got used to being able to just `git checkout branch` to create a local remote-tracking one for that remote branch.

Then we were bitten by a branch `foo` when path `./foo` existed.

I think the syntactic sugar needs to either be removed, or (preferably) be made consistent.

The current behavior is that if I try to checkout a branch that doesn't exist, but does exist on the remote, git creates a local remote tracking branch for the one I tried to check out.

It makes no sense IMHO for the disambiguating syntax to break that behavior, especially since in some cases, the disambiguating syntax is necessary.

Thanks, D
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 10 in “Inconsistent behavior of the path disambiguator”
  1. Dun PealOct 29, 2010
  2. Junio C HamanoOct 29, 2010
  3. Dun PealOct 29, 2010
  4. Re* Inconsistent behavior of the path disambiguatorJunio C Hamano, Oct 29, 2010
  5. Jonathan NiederOct 29, 2010
  6. Junio C HamanoOct 29, 2010
  7. checkout: apply Dscho's dwim even with "--" presentJonathan Nieder, Oct 29, 2010
  8. Jonathan NiederOct 29, 2010
  9. Jonathan NiederOct 30, 2010
  10. Junio C HamanoOct 31, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.