Skip to content
  • Junio C Hamano's avatar
    builtin/clone.c: detect a clone starting at a tag correctly · 60a5f5fc
    Junio C Hamano authored
    31b808a0
    
     (clone --single: limit the fetch refspec to fetched branch,
    2012-09-20) tried to see if the given "branch" to follow is actually
    a tag at the remote repository by checking with "refs/tags/" but it
    incorrectly used strstr(3); it is actively wrong to treat a "branch"
    "refs/heads/refs/tags/foo" and use the logic for the "refs/tags/"
    ref hierarchy.  What the code really wanted to do is to see if it
    starts with "refs/tags/".
    
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    60a5f5fc