From 459e54b5497b53f298fe9164112f9bcb33bedb8d Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Tue, 18 Mar 2025 18:50:27 -0400 Subject: refspec: replace `refspec_item_init()` with fetch/push variants For similar reasons as in the previous refactoring of `refspec_init()` into `refspec_init_fetch()` and `refspec_init_push()`, apply the same refactoring to `refspec_item_init()`. Signed-off-by: Taylor Blau Acked-by: Elijah Newren Signed-off-by: Junio C Hamano --- builtin/pull.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/pull.c') diff --git a/builtin/pull.c b/builtin/pull.c index a68a9955de..a1ebc6ad33 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -738,7 +738,7 @@ static const char *get_tracking_branch(const char *remote, const char *refspec) const char *spec_src; const char *merge_branch; - if (!refspec_item_init(&spec, refspec, 1)) + if (!refspec_item_init_fetch(&spec, refspec)) die(_("invalid refspec '%s'"), refspec); spec_src = spec.src; if (!*spec_src || !strcmp(spec_src, "HEAD")) -- cgit 1.2.3-korg