aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/pull.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-08 11:43:13 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-08 11:43:13 -0700
commitc6b3824a193bc263a764d17def7df7f09ef82a2d (patch)
treedd84f5a6b0d1e8ba365e5b8cbc4e6ee6a2dc844b /builtin/pull.c
parenta7652bf99c654909d98f9b4d40b090357aede779 (diff)
parent459e54b5497b53f298fe9164112f9bcb33bedb8d (diff)
downloadgit-c6b3824a193bc263a764d17def7df7f09ef82a2d.tar.gz
Merge branch 'tb/refspec-fetch-cleanup'
Code clean-up. * tb/refspec-fetch-cleanup: refspec: replace `refspec_item_init()` with fetch/push variants refspec: remove refspec_item_init_or_die() refspec: replace `refspec_init()` with fetch/push variants refspec: treat 'fetch' as a Boolean value
Diffstat (limited to 'builtin/pull.c')
-rw-r--r--builtin/pull.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/pull.c b/builtin/pull.c
index 9c4a00620a..a1ebc6ad33 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -738,7 +738,8 @@ static const char *get_tracking_branch(const char *remote, const char *refspec)
const char *spec_src;
const char *merge_branch;
- refspec_item_init_or_die(&spec, refspec, REFSPEC_FETCH);
+ if (!refspec_item_init_fetch(&spec, refspec))
+ die(_("invalid refspec '%s'"), refspec);
spec_src = spec.src;
if (!*spec_src || !strcmp(spec_src, "HEAD"))
spec_src = "HEAD";