summaryrefslogtreecommitdiffstats
path: root/refspec.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* refspec: convert valid_fetch_refspec to use parse_refspecBrandon Williams2018-05-171-9/+8
| | | | | | | | Convert 'valid_fetch_refspec()' to use the new 'parse_refspec()' function to only parse a single refspec and eliminate an allocation. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refspec: introduce struct refspecBrandon Williams2018-05-171-0/+64
| | | | | | | | | | | | | Introduce 'struct refspec', an abstraction around a collection of 'struct refspec_item's much like how 'struct pathspec' holds a collection of 'struct pathspec_item's. A refspec struct also contains an array of the original refspec strings which will be used to facilitate the migration to using this new abstraction throughout the code base. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refspec: factor out parsing a single refspecBrandon Williams2018-05-171-91/+104
| | | | | | | | Factor out the logic which parses a single refspec into its own function. This makes it easier to reuse this logic in a future patch. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refspec: rename struct refspec to struct refspec_itemBrandon Williams2018-05-171-8/+8
| | | | | | | | | | In preparation for introducing an abstraction around a collection of refspecs (much like how a 'struct pathspec' is a collection of 'struct pathspec_item's) rename the existing 'struct refspec' to 'struct refspec_item'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refspec: move refspec parsing logic into its own fileBrandon Williams2018-05-171-0/+167
In preparation for performing a refactor on refspec related code, move the refspec parsing logic into its own file. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>