All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Antoine Pelisse <apelisse@gmail.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] remote-hg: fix path when cloning with tilde expansion
Date: Fri, 09 Aug 2013 14:45:35 -0700	[thread overview]
Message-ID: <7vfvui4jy8.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALWbr2y5H_dfHAFW_qN+j8YtF4F9+VcG8G503hr4YN2Qv69CXA@mail.gmail.com> (Antoine Pelisse's message of "Fri, 9 Aug 2013 23:19:30 +0200")

Antoine Pelisse <apelisse@gmail.com> writes:

> OK, I think I see why you are puzzled.
> ...
> But my issue is when I do that:
>
>     git clone hg::~/my_repo my_new_repo
>
> The clone works successfully by cloning $HOME/my_repo, but then, when
> we try to fix the repo path, we think that ~/my_repo is not an
> absolute path, so we make it absolute: /home/user/~/my_repo which is
> now off. So I'm not able to fetch that remote.

OK, so clone works, but subsequent fetch from the cloned resoitory
does not?  "git fetch hg::~/my_repo" will still work but the call to
"git config" done near the place your patch touches does not store
"hg::~/my_repo" because it thinks "~/my_repo" refers to
"./~/my_repo" and tries to come up with an absolute path.  The patch
tries to notice this case and return without rewriting, so that
remote.*.url is kept as "hg::~/my_repo".

Assuming that I am following your reasoning so far, I think I can
agree with the patch (not that my agreement matters that much, as
you seem to be a lot more familiar with this codepath).

Thanks for explaining.

  reply	other threads:[~2013-08-09 21:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 20:12 [PATCH] remote-hg: fix path when cloning with tilde expansion Antoine Pelisse
2013-08-05 20:30 ` Felipe Contreras
2013-08-05 20:32   ` Antoine Pelisse
2013-08-09 17:13   ` Antoine Pelisse
2013-08-09 18:49     ` Junio C Hamano
2013-08-09 20:09       ` Antoine Pelisse
2013-08-09 20:53         ` Junio C Hamano
2013-08-09 21:19           ` Antoine Pelisse
2013-08-09 21:45             ` Junio C Hamano [this message]
2013-08-09 21:55               ` Antoine Pelisse
2013-08-09 21:55             ` Felipe Contreras
2013-08-09 22:15               ` Junio C Hamano
2013-08-09 22:28                 ` Felipe Contreras
2013-08-09 23:39                   ` Junio C Hamano
2013-08-09 23:43                     ` Felipe Contreras
2013-08-10  5:18                       ` Junio C Hamano
2013-08-10  6:39                         ` Felipe Contreras
2013-08-10  6:50                           ` Junio C Hamano
2013-08-10  7:07                             ` Felipe Contreras
2013-08-10 15:15                               ` Antoine Pelisse

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=7vfvui4jy8.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=apelisse@gmail.com \
    --cc=felipe.contreras@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 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.