From 0baad1f3aee508d84bf74b9670f283f8c91e55dd Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Tue, 18 Mar 2025 18:50:21 -0400 Subject: 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 Acked-by: Elijah Newren Signed-off-by: Junio C Hamano --- refspec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'refspec.h') diff --git a/refspec.h b/refspec.h index 155494cd3a..7db68e56c8 100644 --- a/refspec.h +++ b/refspec.h @@ -52,7 +52,8 @@ int refspec_item_init(struct refspec_item *item, const char *refspec, void refspec_item_init_or_die(struct refspec_item *item, const char *refspec, int fetch); void refspec_item_clear(struct refspec_item *item); -void refspec_init(struct refspec *rs, int fetch); +void refspec_init_fetch(struct refspec *rs); +void refspec_init_push(struct refspec *rs); void refspec_append(struct refspec *rs, const char *refspec); __attribute__((format (printf,2,3))) void refspec_appendf(struct refspec *rs, const char *fmt, ...); -- cgit v1.3-5-g9baa