diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/refspec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/refspec.c b/src/refspec.c index debde8692..d200e5609 100644 --- a/src/refspec.c +++ b/src/refspec.c @@ -53,8 +53,10 @@ int git_refspec__parse(git_refspec *refspec, const char *input, bool is_fetch) if (rhs) { size_t rlen = strlen(++rhs); - is_glob = (1 <= rlen && strchr(rhs, '*')); - refspec->dst = git__strndup(rhs, rlen); + if (rlen || !is_fetch) { + is_glob = (1 <= rlen && strchr(rhs, '*')); + refspec->dst = git__strndup(rhs, rlen); + } } llen = (rhs ? (size_t)(rhs - lhs - 1) : strlen(lhs)); |
