git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Giokas <1007380@gmail.com>
To: git@vger.kernel.org
Cc: fsckdaemon@gmail.com
Subject: [BUG] Filenames with single colon being treated as remote repository
Date: Sat, 20 Apr 2013 23:53:29 -0500	[thread overview]
Message-ID: <20130421045329.GB30538@WST420> (raw)

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

All,

It was brought to my attention today that git has some weird behaviour
when colons (:) are used in directory names.

In my distros packaging system, for git repositories we clone a bare
repo and then clone that bare repo locally as a temporary build
directory (no, we can't use cp, it's a bare repository). Say we have a
directory, /tmp/foo:bar/baz, that is a git repository. If I want to get
a clone of that repository locally, using all of the local
optimizations, then I need to run::

    $ git clone /tmp/foo:bar/baz /tmp/new-baz

but running this gives me this output::

    Cloning into 'new-baz'...
    ssh: Could not resolve hostname /tmp/foo: Success
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    
which it should not be doing. It is possible to use a file:// url to
clone it, but then the --local option is ignored and no optimizations
are made. After asking on #git, I was directed to the transport.c file,
but I don't know what in that is failing. We ran some tests on the
is_local function and it seems to work correctly.

Any ideas on how to debug this further?

Thank you,
-- 
William Giokas | KaiSforza
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2013-04-21  5:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-21  4:53 William Giokas [this message]
2013-04-21  6:05 ` [BUG] Filenames with single colon being treated as remote repository Jonathan Nieder
2013-04-21 12:45   ` Jeff King
2013-04-21 16:56     ` Jonathan Nieder
2013-04-21 18:01     ` Junio C Hamano
2013-04-22 15:35       ` Jeff King
2013-04-22 16:00         ` Junio C Hamano
2013-04-27  3:36         ` [PATCH] clone: allow cloning local paths with colons in them Nguyễn Thái Ngọc Duy
2013-04-27 20:08           ` William Giokas
2013-04-27 21:16           ` Junio C Hamano
2013-04-28  0:19             ` Duy Nguyen
2013-04-28  1:48               ` Eric Sunshine
2013-04-28  2:15                 ` Duy Nguyen
2013-05-04  2:19           ` [PATCH v2] " Nguyễn Thái Ngọc Duy
2013-05-07 15:34             ` Junio C Hamano
2013-05-07 16:47               ` Jeff King

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=20130421045329.GB30538@WST420 \
    --to=1007380@gmail.com \
    --cc=fsckdaemon@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).