Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:23

Antoine Pelisse [off-list ref] 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.

Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

From: Antoine Pelisse <hidden>
Date: 2016-06-15 22:58:23

On Fri, Aug 9, 2013 at 11:45 PM, Junio C Hamano [off-list ref] wrote:
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.
Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help