Skip to content

Commit

Permalink
api-remote.txt: correct section "struct refspec"
Browse files Browse the repository at this point in the history
* Replace reference to function parse_ref_spec() with references to
  functions parse_fetch_refspec() and parse_push_refspec().

* Correct description of src and dst: they *do* include the '*'
  characters.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Oct 24, 2013
1 parent 68a304d commit 5b2515f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Documentation/technical/api-remote.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ default remote, given the current branch and configuration.
struct refspec
--------------

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 (if a pattern, only the part outside of the wildcards); 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 "".

This parsing can be done to an array of strings to give an array of
struct refpsecs with parse_ref_spec().
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
Expand Down

0 comments on commit 5b2515f

Please sign in to comment.