From ec6829e4849feb7b0343940e00896055027b06eb Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Tue, 18 Mar 2025 18:50:24 -0400 Subject: refspec: remove refspec_item_init_or_die() There are two callers of this function, which ensures that a dispatched call to refspec_item_init() does not fail. In the following commit, we're going to add fetch/push-specific variants of refspec_item_init(), which will turn one function into two. To avoid introducing yet another pair of new functions (such as refspec_item_init_push_or_die() and refspec_item_init_fetch_or_die()), let's remove the thin wrapper entirely. This duplicates a single line of code among two callers, but thins the refspec.h API by one function, and prevents introducing two more in the following commit. Note that we still have a trailing Boolean argument in the function `refspec_item_init()`. The following commit will address this. Signed-off-by: Taylor Blau Acked-by: Elijah Newren Signed-off-by: Junio C Hamano --- refspec.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'refspec.h') diff --git a/refspec.h b/refspec.h index 7db68e56c8..614f34554e 100644 --- a/refspec.h +++ b/refspec.h @@ -49,8 +49,6 @@ struct refspec { int refspec_item_init(struct refspec_item *item, const char *refspec, int fetch); -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_fetch(struct refspec *rs); void refspec_init_push(struct refspec *rs); -- cgit v1.3-5-g9baa