mirror of
https://github.com/git/git.git
synced 2024-05-29 03:56:10 +02:00
ec0cb49655
In preparation for performing a refactor on refspec related code, move the refspec parsing logic into its own file. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
24 lines
546 B
C
24 lines
546 B
C
#ifndef REFSPEC_H
|
|
#define REFSPEC_H
|
|
|
|
#define TAG_REFSPEC "refs/tags/*:refs/tags/*"
|
|
extern const struct refspec *tag_refspec;
|
|
|
|
struct refspec {
|
|
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 *parse_fetch_refspec(int nr_refspec, const char **refspec);
|
|
struct refspec *parse_push_refspec(int nr_refspec, const char **refspec);
|
|
|
|
void free_refspec(int nr_refspec, struct refspec *refspec);
|
|
|
|
#endif /* REFSPEC_H */
|