4 #define TAG_REFSPEC "refs/tags/*:refs/tags/*"
5 extern const struct refspec_item
*tag_refspec
;
8 * A struct refspec_item holds the parsed interpretation of a refspec. If it will
9 * force updates (starts with a '+'), force is true. If it is a pattern
10 * (sides end with '*') pattern is true. src and dest are the two sides
11 * (including '*' characters if present); if there is only one side, it is src,
12 * and dst is NULL; if sides exist but are empty (i.e., the refspec either
13 * starts or ends with ':'), the corresponding side is "".
15 * remote_find_tracking(), given a remote and a struct refspec_item with either src
16 * or dst filled out, will fill out the other such that the result is in the
17 * "fetch" specification for the remote (note that this evaluates patterns and
18 * returns a single result).
23 unsigned matching
: 1;
24 unsigned exact_sha1
: 1;
30 #define REFSPEC_FETCH 1
31 #define REFSPEC_PUSH 0
33 #define REFSPEC_INIT_FETCH { .fetch = REFSPEC_FETCH }
34 #define REFSPEC_INIT_PUSH { .fetch = REFSPEC_PUSH }
37 * An array of strings can be parsed into a struct refspec using
38 * parse_fetch_refspec() or parse_push_refspec().
41 struct refspec_item
*items
;
52 int refspec_item_init(struct refspec_item
*item
, const char *refspec
,
54 void refspec_item_init_or_die(struct refspec_item
*item
, const char *refspec
,
56 void refspec_item_clear(struct refspec_item
*item
);
57 void refspec_init(struct refspec
*rs
, int fetch
);
58 void refspec_append(struct refspec
*rs
, const char *refspec
);
59 void refspec_appendn(struct refspec
*rs
, const char **refspecs
, int nr
);
60 void refspec_clear(struct refspec
*rs
);
62 int valid_fetch_refspec(const char *refspec
);
66 * Determine what <prefix> values to pass to the peer in ref-prefix lines
67 * (see Documentation/technical/protocol-v2.txt).
69 void refspec_ref_prefixes(const struct refspec
*rs
,
70 struct strvec
*ref_prefixes
);
72 #endif /* REFSPEC_H */