mirror of
https://github.com/git/git.git
synced 2026-01-11 21:33:13 +09:00
In preparation for introducing an abstraction around a collection of refspecs (much like how a 'struct pathspec' is a collection of 'struct pathspec_item's) rename the existing 'struct refspec' to 'struct refspec_item'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
24 lines
571 B
C
24 lines
571 B
C
#ifndef REFSPEC_H
|
|
#define REFSPEC_H
|
|
|
|
#define TAG_REFSPEC "refs/tags/*:refs/tags/*"
|
|
extern const struct refspec_item *tag_refspec;
|
|
|
|
struct refspec_item {
|
|
unsigned force : 1;
|
|
unsigned pattern : 1;
|
|
unsigned matching : 1;
|
|
unsigned exact_sha1 : 1;
|
|
|
|
char *src;
|
|
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);
|
|
|
|
void free_refspec(int nr_refspec, struct refspec_item *refspec);
|
|
|
|
#endif /* REFSPEC_H */
|