aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/pull.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2025-03-18 18:50:27 -0400
committerJunio C Hamano <gitster@pobox.com>2025-03-21 01:45:16 -0700
commit459e54b5497b53f298fe9164112f9bcb33bedb8d (patch)
tree298147dd9214e0ab90606c3ebbc7b06c02ff2050 /builtin/pull.c
parentec6829e4849feb7b0343940e00896055027b06eb (diff)
downloadgit-459e54b5497b53f298fe9164112f9bcb33bedb8d.tar.gz
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 <me@ttaylorr.com> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pull.c')
-rw-r--r--builtin/pull.c2
1 files changed, 1 insertions, 1 deletions
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"))