Skip to content

refactoring refspecs

Brandon Williams git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest36 patches 1 replyIn review
  2. v135 patches 17 repliesSuperseded

Changes in v2 from the cover letter

* added missing extern keyword in the first patch
* reordered patch 2 and 3 and updated some comments to be clearer.
* fixed some memory leaks
* squashed in some changes recommended by Aevar

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/36refspec: move refspec parsing logic into its own fileMakefile branch.c builtin/clone.c +14 more+205 -1840 replies
2/36refspec: rename struct refspec to struct refspec_itembranch.c builtin/clone.c builtin/fast-export.c +12 more+73 -740 replies
3/36refspec: factor out parsing a single refspecrefspec.c+104 -910 replies
4/36refspec: introduce struct refspecrefspec.c refspec.h+89 -00 replies
5/36refspec: convert valid_fetch_refspec to use parse_refspecrefspec.c refspec.h+10 -1012 replies
6/36submodule--helper: convert push_check to use struct refspecbuiltin/submodule--helper.c+7 -60 replies
7/36pull: convert get_tracking_branch to use refspec_item_initbuiltin/pull.c+4 -40 replies
8/36transport: convert transport_push to use struct refspectransport.c+9 -80 replies
9/36remote: convert check_push_refs to use struct refspecremote.c+6 -40 replies
10/36remote: convert match_push_refs to use struct refspecremote.c+8 -50 replies
11/36clone: convert cmd_clone to use refspec_item_initbuiltin/clone.c+4 -60 replies
12/36fast-export: convert to use struct refspecbuiltin/fast-export.c+7 -140 replies
13/36remote: convert push refspecs to struct refspecbuiltin/push.c builtin/remote.c remote.c +1 more+28 -370 replies
14/36remote: convert fetch refspecs to struct refspecbuiltin/fetch.c builtin/remote.c remote.c +1 more+32 -490 replies
15/36remote: remove add_prune_tags_to_fetch_refspecbuiltin/fetch.c remote.c remote.h+1 -80 replies
16/36transport-helper: convert to use struct refspectransport-helper.c+12 -260 replies
17/36fetch: convert fetch_one to use struct refspecbuiltin/fetch.c+19 -270 replies
18/36fetch: convert refmap to use struct refspecbuiltin/fetch.c+7 -100 replies
19/36refspec: remove the deprecated functionsrefspec.c refspec.h+0 -540 replies
20/36fetch: convert do_fetch to take a struct refspecbuiltin/fetch.c+5 -50 replies
21/36fetch: convert get_ref_map to take a struct refspecbuiltin/fetch.c+20 -230 replies
22/36fetch: convert prune_refs to take a struct refspecbuiltin/fetch.c+5 -60 replies
23/36remote: convert get_stale_heads to take a struct refspecbuiltin/fetch.c builtin/remote.c remote.c +1 more+12 -130 replies
24/36remote: convert apply_refspecs to take a struct refspecbuiltin/fast-export.c remote.c remote.h +1 more+11 -150 replies
25/36remote: convert query_refspecs to take a struct refspecbuiltin/push.c remote.c remote.h+7 -80 replies
26/36remote: convert get_ref_match to take a struct refspecremote.c+14 -120 replies
27/36remote: convert match_explicit_refs to take a struct refspecremote.c+4 -50 replies
28/36push: check for errors earlierbuiltin/push.c+14 -170 replies
29/36push: convert to use struct refspecbuiltin/push.c+15 -230 replies
30/36transport: convert transport_push to take a struct refspecbuiltin/push.c transport.c transport.h+9 -130 replies
31/36send-pack: store refspecs in a struct refspecbuiltin/send-pack.c+7 -170 replies
32/36transport: remove transport_verify_remote_namesbuiltin/send-pack.c transport.c transport.h+0 -280 replies
33/36http-push: store refspecs in a struct refspechttp-push.c+8 -90 replies
34/36remote: convert match_push_refs to take a struct refspecbuiltin/remote.c builtin/send-pack.c http-push.c +3 more+13 -220 replies
35/36remote: convert check_push_refs to take a struct refspecremote.c remote.h transport.c+7 -110 replies
36/36submodule: convert push_unpushed_submodules to take a struct refspecsubmodule.c submodule.h transport.c+12 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/36] refactoring refspecs

Changes in v2:
* added missing extern keyword in the first patch
* reordered patch 2 and 3 and updated some comments to be clearer.
* fixed some memory leaks
* squashed in some changes recommended by Aevar

Brandon Williams (36):
refspec: move refspec parsing logic into its own file
refspec: rename struct refspec to struct refspec_item
refspec: factor out parsing a single refspec
refspec: introduce struct refspec
refspec: convert valid_fetch_refspec to use parse_refspec
submodule--helper: convert push_check to use struct refspec
pull: convert get_tracking_branch to use refspec_item_init
transport: convert transport_push to use struct refspec
remote: convert check_push_refs to use struct refspec
remote: convert match_push_refs to use struct refspec
clone: convert cmd_clone to use refspec_item_init
fast-export: convert to use struct refspec
remote: convert push refspecs to struct refspec
remote: convert fetch refspecs to struct refspec
remote: remove add_prune_tags_to_fetch_refspec
transport-helper: convert to use struct refspec
fetch: convert fetch_one to use struct refspec
fetch: convert refmap to use struct refspec
refspec: remove the deprecated functions
fetch: convert do_fetch to take a struct refspec
fetch: convert get_ref_map to take a struct refspec
fetch: convert prune_refs to take a struct refspec
remote: convert get_stale_heads to take a struct refspec
remote: convert apply_refspecs to take a struct refspec
remote: convert query_refspecs to take a struct refspec
remote: convert get_ref_match to take a struct refspec
remote: convert match_explicit_refs to take a struct refspec
push: check for errors earlier
push: convert to use struct refspec
transport: convert transport_push to take a struct refspec
send-pack: store refspecs in a struct refspec
transport: remove transport_verify_remote_names
http-push: store refspecs in a struct refspec
remote: convert match_push_refs to take a struct refspec
remote: convert check_push_refs to take a struct refspec
submodule: convert push_unpushed_submodules to take a struct refspec

 Makefile                    |   1 +
 branch.c                    |   7 +-
 builtin/clone.c             |  13 +-
 builtin/fast-export.c       |  22 +--
 builtin/fetch.c             | 134 ++++++--------
 builtin/merge.c             |   1 +
 builtin/pull.c              |   9 +-
 builtin/push.c              |  80 ++++----
 builtin/remote.c            |  37 ++--
 builtin/send-pack.c         |  24 +--
 builtin/submodule--helper.c |  14 +-
 checkout.c                  |   5 +-
 http-push.c                 |  18 +-
 refspec.c                   | 194 ++++++++++++++++++++
 refspec.h                   |  44 +++++
 remote.c                    | 353 ++++++++----------------------------
 remote.h                    |  50 ++---
 submodule.c                 |  19 +-
 submodule.h                 |   3 +-
 transport-helper.c          |  39 ++--
 transport.c                 |  51 ++----
 transport.h                 |   4 +-
 22 files changed, 527 insertions(+), 595 deletions(-)
 create mode 100644 refspec.c
 create mode 100644 refspec.h
Signature · 1 line
2.17.0.441.gb46fe60e1d-goog