Re: [PATCH 3/3] clone: always fetch remote HEAD

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Jeff King <peff@xxxxxxxx> writes:
>
>> I did some more digging. I don't think the problem is with HEAD at all,
>> but rather with asking for more than one ref at all.
>> ...
>> Does that make sense? If so, then I think the right fix is for testgit
>> ti ignore all imports after the first one (since the first one will have
>> done all available refs). And the patch is:
>
> After reading Sverre's answer, I think this makes sense as a short-term
> workaround.  Shall we squah it in to 3/3?

I'll queue it separately as a tentative commit (below) and leave it in
'pu' for now. Please give it a better description so that we can move the
fix forward.

commit 2dbce8e7849279d9ef7d211390efd0da71e230ab
Author: Jeff King <peff@xxxxxxxx>
Date:   Fri Jun 3 14:10:52 2011 -0400

    remote-testgit: short-term fix to allow t5800 pass
    
    The test helper issues implements "import" but does not honor
    the branch argument; instead it imports everything and ends up
    not working well when more than one "import" is given.
    
    As a short-term workaround, just ignore second and later "import"
    commands.
    
    Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>

diff --git a/git-remote-testgit.py b/git-remote-testgit.py
index df9d512..de644d2 100644
--- a/git-remote-testgit.py
+++ b/git-remote-testgit.py
@@ -111,13 +111,19 @@ def update_local_repo(repo):
     return repo
 
 
+did_import = False
 def do_import(repo, args):
     """Exports a fast-import stream from testgit for git to import.
     """
+    global did_import
 
     if len(args) != 1:
         die("Import needs exactly one ref")
 
+    if did_import:
+        return
+    did_import = True
+
     if not repo.gitdir:
         die("Need gitdir to import")
 
--
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]