refspec: replace refspec_init() with fetch/push variants

To avoid having a Boolean argument in the refspec_init() function,
replace it with two variants:

  - `refspec_init_fetch()`
  - `refspec_init_push()`

to codify the meaning of that Boolean into the function's name itself.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Taylor Blau
2025-03-18 18:50:21 -04:00
committed by Junio C Hamano
parent 3809633d0a
commit 0baad1f3ae
4 changed files with 14 additions and 7 deletions

View File

@@ -162,7 +162,7 @@ static struct child_process *get_helper(struct transport *transport)
data->helper = helper;
data->no_disconnect_req = 0;
refspec_init(&data->rs, 1);
refspec_init_fetch(&data->rs);
/*
* Open the output as FILE* so strbuf_getline_*() family of