refspec: fix documentation referring to refspec_item
In commit d27eb356bf25 ("remote: move doc to remote.h and refspec.h") the documentation for the refspec structure was moved into refspec.h This documentation refers to elements of the refspec_item, not the struct refspec. Move the documentation slightly in order to align it with the structure it is actually referring to. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jacob Keller committed
Aug 14, 2020 at 17:25 UTC
0becfec5b154c37a0cd2d3f7a6a0c908ba7b5c1e
1 file changed
+14
-13
refspec.h
+14
-13
@@ -4,6 +4,19 @@
4
#define TAG_REFSPEC "refs/tags/*:refs/tags/*"
5
extern const struct refspec_item *tag_refspec;
6
7
+/**
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 "".
14
+ *
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).
19
+ */
20
struct refspec_item {
21
unsigned force : 1;
22
unsigned pattern : 1;
@@ -21,20 +34,8 @@ struct refspec_item {
34
#define REFSPEC_INIT_PUSH { .fetch = REFSPEC_PUSH }
35
36
/**
24
- * A struct refspec holds the parsed interpretation of a refspec. If it will
25
- * force updates (starts with a '+'), force is true. If it is a pattern
26
- * (sides end with '*') pattern is true. src and dest are the two sides
27
- * (including '*' characters if present); if there is only one side, it is src,
28
- * and dst is NULL; if sides exist but are empty (i.e., the refspec either
29
- * starts or ends with ':'), the corresponding side is "".
30
- *
31
- * An array of strings can be parsed into an array of struct refspecs using
37
+ * An array of strings can be parsed into a struct refspec using
38
* parse_fetch_refspec() or parse_push_refspec().
33
- *
34
- * remote_find_tracking(), given a remote and a struct refspec with either src
35
- * or dst filled out, will fill out the other such that the result is in the
36
- * "fetch" specification for the remote (note that this evaluates patterns and
37
- * returns a single result).
39
*/
40
struct refspec {
41
struct refspec_item *items;