Merge branch 'jc/fix-clone-single-starting-at-a-tag'
[gitweb.git] / builtin / clone.c
index a5b2d9db360eb59d5a73c2e221fed047a94b0615..e15ca332b5637421fb187ce4db478c60dded958c 100644 (file)
@@ -696,7 +696,7 @@ static void write_refspec_config(const char* src_ref_prefix,
        if (option_mirror || !option_bare) {
                if (option_single_branch && !option_mirror) {
                        if (option_branch) {
-                               if (strstr(our_head_points_at->name, "refs/tags/"))
+                               if (starts_with(our_head_points_at->name, "refs/tags/"))
                                        strbuf_addf(&value, "+%s:%s", our_head_points_at->name,
                                                our_head_points_at->name);
                                else