From: Hui Wang <jason77.wang@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: <git@vger.kernel.org>, Hui Wang <jason77.wang@gmail.com>
Subject: Re: [PATCH 0/2] clone-local fixup
Date: Tue, 23 Aug 2011 11:43:05 +0800 [thread overview]
Message-ID: <4E5321C9.4080301@gmail.com> (raw)
In-Reply-To: <1314061516-24964-1-git-send-email-gitster@pobox.com>
This patch series solved the problem from the root cause. :-)
But there is a little problem in the second patch, i provide an
incremental patch basing on your second patch, if it is fine to you, it
is OK to squash this patch to your second patch.
commit 47e890818fdac5f6493cd0bbaf9da350785a2bca
Author: Hui Wang <jason77.wang@gmail.com>
Date: Tue Aug 23 11:32:26 2011 +0800
clone: don't change absolute path in the copy_alternates
The source alternates may include empty lines, comment lines, relative
paths and absolute paths. Absolute paths don't need to be changed
before added to the destination alternates.
Signed-off-by: Hui Wang <jason77.wang@gmail.com>
diff --git a/builtin/clone.c b/builtin/clone.c
index 2842707..284e325 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -258,6 +258,10 @@ static void copy_alternates(struct strbuf *src,
struct strbuf *dst,
char *abs_path, abs_buf[PATH_MAX];
if (!line.len || line.buf[0] == '#')
continue;
+ if (is_absolute_path(line.buf)) {
+ add_to_alternates_file(line.buf);
+ continue;
+ }
abs_path = mkpath("%s/objects/%s", src_repo, line.buf);
normalize_path_copy(abs_buf, abs_path);
add_to_alternates_file(abs_buf);
Regards,
Hui.
Junio C Hamano wrote:
> So I ended up tackling this myself. I didn't bother moving the
> add_to_alternates_file(), though.
>
> Junio C Hamano (2):
> clone: allow more than one --reference
> clone: clone from a repository with relative alternates
>
> builtin/clone.c | 82 +++++++++++++++++++++++++++++++++++++++++------------
> sha1_file.c | 2 +-
> t/t5601-clone.sh | 23 +++++++++++++++
> 3 files changed, 87 insertions(+), 20 deletions(-)
>
>
next prev parent reply other threads:[~2011-08-23 3:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 9:05 [PATCH v2 0/1] git-clone: fix relative path problem in the alternates Hui Wang
2011-08-22 9:05 ` [PATCH v2 1/1] clone: replace relative paths " Hui Wang
2011-08-22 19:10 ` [PATCH v2 0/1] git-clone: fix relative path problem " Junio C Hamano
2011-08-22 20:38 ` Junio C Hamano
2011-08-22 21:57 ` Junio C Hamano
2011-08-23 1:05 ` [PATCH 0/2] clone-local fixup Junio C Hamano
2011-08-23 1:05 ` [PATCH 1/2] clone: allow more than one --reference Junio C Hamano
2011-08-23 1:05 ` [PATCH 2/2] clone: clone from a repository with relative alternates Junio C Hamano
2011-08-23 3:43 ` Hui Wang [this message]
2011-08-23 16:26 ` [PATCH 0/2] clone-local fixup Junio C Hamano
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=4E5321C9.4080301@gmail.com \
--to=jason77.wang@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.