Re: [PATCH 0/2] clone-local fixup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
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@xxxxxxxxx>

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(-)


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]