Tighten refspec processing
[gitweb.git] / builtin-send-pack.c
index 8afb1d0bca0635dc22f658455477d9fada231290..98c54d9e2859300879926a9fbc3b4193e553e2cf 100644 (file)
@@ -536,7 +536,7 @@ static void verify_remote_names(int nr_heads, const char **heads)
        int i;
 
        for (i = 0; i < nr_heads; i++) {
-               const char *remote = strchr(heads[i], ':');
+               const char *remote = strrchr(heads[i], ':');
 
                remote = remote ? (remote + 1) : heads[i];
                switch (check_ref_format(remote)) {