Skip to content

Commit 0becfec

Browse files
jacob-kellergitster
authored andcommitted
refspec: fix documentation referring to refspec_item
In commit d27eb35 ("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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 878e727 commit 0becfec

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

refspec.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44
#define TAG_REFSPEC "refs/tags/*:refs/tags/*"
55
extern const struct refspec_item *tag_refspec;
66
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+
*/
720
struct refspec_item {
821
unsigned force : 1;
922
unsigned pattern : 1;
@@ -21,20 +34,8 @@ struct refspec_item {
2134
#define REFSPEC_INIT_PUSH { .fetch = REFSPEC_PUSH }
2235

2336
/**
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
3238
* 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).
3839
*/
3940
struct refspec {
4041
struct refspec_item *items;

0 commit comments

Comments
 (0)