fetch: do not pass ref-prefixes for fetch by exact SHA1
[git/git.git] / refspec.c
index c59a4cc..ada7854 100644 (file)
--- a/refspec.c
+++ b/refspec.c
@@ -202,6 +202,8 @@ void refspec_ref_prefixes(const struct refspec *rs,
                const struct refspec_item *item = &rs->items[i];
                const char *prefix = NULL;
 
+               if (item->exact_sha1)
+                       continue;
                if (rs->fetch == REFSPEC_FETCH)
                        prefix = item->src;
                else if (item->dst)