Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
contrib: add a script to initialize VS Code configuration
[gitweb.git]
/
refspec.c
diff --git
a/refspec.c
b/refspec.c
index e4c9e86bb60bc381d5ee03fd61bb9ed6d1ad55c9..e8010dce0ce27472c2b3269e13b9c1de6a69f3cc 100644
(file)
--- a/
refspec.c
+++ b/
refspec.c
@@
-49,6
+49,8
@@
static int parse_refspec(struct refspec_item *item, const char *refspec, int fet
size_t rlen = strlen(++rhs);
is_glob = (1 <= rlen && strchr(rhs, '*'));
item->dst = xstrndup(rhs, rlen);
+ } else {
+ item->dst = NULL;
}
llen = (rhs ? (rhs - lhs - 1) : strlen(lhs));