diff options
author | Brandon Williams <bmwill@google.com> | 2018-03-15 10:31:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-15 12:01:08 -0700 |
commit | b4be74105febef5c6235e1e2f1e468e76166cad8 (patch) | |
tree | eb61d2519d6f2ef3e3014dc1fd0d754a6b0a2934 /refs.h | |
parent | 1af8ae1cfa44a3f3c3f1efb7f9ebe68bc0ce7578 (diff) | |
download | git-b4be74105febef5c6235e1e2f1e468e76166cad8.tar.gz |
ls-remote: pass ref prefixes when requesting a remote's refs
Construct an argv_array of ref prefixes based on the patterns supplied
via the command line and pass them to 'transport_get_remote_refs()' to
be used when communicating protocol v2 so that the server can limit the
ref advertisement based on those prefixes.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -139,6 +139,13 @@ int resolve_gitlink_ref(const char *submodule, const char *refname, */ int refname_match(const char *abbrev_name, const char *full_name); +/* + * Given a 'prefix' expand it by the rules in 'ref_rev_parse_rules' and add + * the results to 'prefixes' + */ +struct argv_array; +void expand_ref_prefix(struct argv_array *prefixes, const char *prefix); + int expand_ref(const char *str, int len, struct object_id *oid, char **ref); int dwim_ref(const char *str, int len, struct object_id *oid, char **ref); int dwim_log(const char *str, int len, struct object_id *oid, char **ref); |