diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-16 13:08:39 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-16 13:08:39 -0800 |
commit | 26c816a67de449b3c5284ab97b03aeeeeabbb45c (patch) | |
tree | 2cca69d5115269b1c680b1ccd852202e1f7b5862 /refspec.h | |
parent | f0070a7df98540ebd0ba6ecb7aef4620efe27724 (diff) | |
parent | 6c51cb525da47a751b856bba55522ca9d4c24dac (diff) |
Merge branch 'hw/doc-in-header'
* hw/doc-in-header:
trace2: move doc to trace2.h
submodule-config: move doc to submodule-config.h
tree-walk: move doc to tree-walk.h
trace: move doc to trace.h
run-command: move doc to run-command.h
parse-options: add link to doc file in parse-options.h
credential: move doc to credential.h
argv-array: move doc to argv-array.h
cache: move doc to cache.h
sigchain: move doc to sigchain.h
pathspec: move doc to pathspec.h
revision: move doc to revision.h
attr: move doc to attr.h
refs: move doc to refs.h
remote: move doc to remote.h and refspec.h
sha1-array: move doc to sha1-array.h
merge: move doc to ll-merge.h
graph: move doc to graph.h and graph.c
dir: move doc to dir.h
diff: move doc to diff.h and diffcore.h
Diffstat (limited to 'refspec.h')
-rw-r--r-- | refspec.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -20,6 +20,22 @@ struct refspec_item { #define REFSPEC_INIT_FETCH { .fetch = REFSPEC_FETCH } #define REFSPEC_INIT_PUSH { .fetch = REFSPEC_PUSH } +/** + * A struct refspec holds the parsed interpretation of a refspec. If it will + * force updates (starts with a '+'), force is true. If it is a pattern + * (sides end with '*') pattern is true. src and dest are the two sides + * (including '*' characters if present); if there is only one side, it is src, + * and dst is NULL; if sides exist but are empty (i.e., the refspec either + * starts or ends with ':'), the corresponding side is "". + * + * An array of strings can be parsed into an array of struct refspecs using + * parse_fetch_refspec() or parse_push_refspec(). + * + * remote_find_tracking(), given a remote and a struct refspec with either src + * or dst filled out, will fill out the other such that the result is in the + * "fetch" specification for the remote (note that this evaluates patterns and + * returns a single result). + */ struct refspec { struct refspec_item *items; int alloc; |