summaryrefslogtreecommitdiff
path: root/refspec.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-05-16 23:48:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-17 21:35:35 (GMT)
commit6373cb598e1a4e0340583ad75d5abba01ff79774 (patch)
treed9d49fbbc92bebbd228816ca736af7b23403c74f /refspec.h
parent60fba4bf1670e6eabd61b04ebf86efedff866a50 (diff)
downloadgit-6373cb598e1a4e0340583ad75d5abba01ff79774.zip
git-6373cb598e1a4e0340583ad75d5abba01ff79774.tar.gz
git-6373cb598e1a4e0340583ad75d5abba01ff79774.tar.bz2
refspec: consolidate ref-prefix generation logic
When using protocol v2 a client constructs a list of ref-prefixes which are sent across the wire so that the server can do server-side filtering of the ref-advertisement. The logic that does this exists for both fetch and push (even though no push support for v2 currently exists yet) and is roughly the same so lets consolidate this logic and make it general enough that it can be used for both the push and fetch cases. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/refspec.h b/refspec.h
index 7e1ff94..01b700e 100644
--- a/refspec.h
+++ b/refspec.h
@@ -41,4 +41,8 @@ void refspec_clear(struct refspec *rs);
int valid_fetch_refspec(const char *refspec);
+struct argv_array;
+void refspec_ref_prefixes(const struct refspec *rs,
+ struct argv_array *ref_prefixes);
+
#endif /* REFSPEC_H */