summaryrefslogtreecommitdiff
path: root/refspec.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-05-16 22:57:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-17 21:19:42 (GMT)
commitc8fa9efe3a8765f44eacc5b0e114053a0297dfff (patch)
tree7aa5b896ab8021b31b418d256a0fe5d7c81e0b87 /refspec.h
parent6d4c05785946e302e611be9ac1f5ca0b5ada9214 (diff)
downloadgit-c8fa9efe3a8765f44eacc5b0e114053a0297dfff.zip
git-c8fa9efe3a8765f44eacc5b0e114053a0297dfff.tar.gz
git-c8fa9efe3a8765f44eacc5b0e114053a0297dfff.tar.bz2
refspec: convert valid_fetch_refspec to use parse_refspec
Convert 'valid_fetch_refspec()' to use the new 'parse_refspec()' function to only parse a single refspec and eliminate an allocation. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refspec.h')
-rw-r--r--refspec.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/refspec.h b/refspec.h
index da31358..1063c64 100644
--- a/refspec.h
+++ b/refspec.h
@@ -14,7 +14,6 @@ struct refspec_item {
char *dst;
};
-int valid_fetch_refspec(const char *refspec);
struct refspec_item *parse_fetch_refspec(int nr_refspec, const char **refspec);
struct refspec_item *parse_push_refspec(int nr_refspec, const char **refspec);
@@ -45,4 +44,6 @@ void refspec_append(struct refspec *rs, const char *refspec);
void refspec_appendn(struct refspec *rs, const char **refspecs, int nr);
void refspec_clear(struct refspec *rs);
+int valid_fetch_refspec(const char *refspec);
+
#endif /* REFSPEC_H */