aboutsummaryrefslogtreecommitdiffstats
path: root/remote.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2025-03-18 18:50:21 -0400
committerJunio C Hamano <gitster@pobox.com>2025-03-21 01:45:16 -0700
commit0baad1f3aee508d84bf74b9670f283f8c91e55dd (patch)
treecb48414cc881f331b4e2d90da6c0485c0c9b648c /remote.c
parentrefspec: treat 'fetch' as a Boolean value (diff)
downloadgit-0baad1f3aee508d84bf74b9670f283f8c91e55dd.tar.gz
git-0baad1f3aee508d84bf74b9670f283f8c91e55dd.zip
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>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/remote.c b/remote.c
index addd4a9999..25af97a44b 100644
--- a/remote.c
+++ b/remote.c
@@ -143,8 +143,8 @@ static struct remote *make_remote(struct remote_state *remote_state,
ret->prune = -1; /* unspecified */
ret->prune_tags = -1; /* unspecified */
ret->name = xstrndup(name, len);
- refspec_init(&ret->push, 0);
- refspec_init(&ret->fetch, 1);
+ refspec_init_push(&ret->push);
+ refspec_init_fetch(&ret->fetch);
string_list_init_dup(&ret->server_options);
ALLOC_GROW(remote_state->remotes, remote_state->remotes_nr + 1,