aboutsummaryrefslogtreecommitdiffstats
path: root/refspec.h
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 /refspec.h
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 'refspec.h')
-rw-r--r--refspec.h3
1 files changed, 2 insertions, 1 deletions
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, ...);