aboutsummaryrefslogtreecommitdiff
path: root/refspec.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-04-01 10:28:19 -0700
committerJunio C Hamano <gitster@pobox.com>2026-04-01 10:28:19 -0700
commit949f59e96311dc85bc4b00a70f74ec0dfa2e37e0 (patch)
tree5e45be22cb6d013295079d046336b457b7c6f31f /refspec.c
parent93841d029e2c33b2e1ff9c89a0f7a9c83e83f895 (diff)
parent4e5dc601ddc5f0d8ab035210554d9e15aa376032 (diff)
downloadgit-949f59e96311dc85bc4b00a70f74ec0dfa2e37e0.tar.xz
Merge branch 'kj/refspec-parsing-outside-repository'
"git ls-remote '+refs/tags/*:refs/tags/*' https://..." run outside a repository would dereference a NULL while trying to see if the given refspec is a single-object refspec, which has been corrected. * kj/refspec-parsing-outside-repository: refspec: fix typo in comment remote-curl: fall back to default hash outside repo
Diffstat (limited to 'refspec.c')
-rw-r--r--refspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refspec.c b/refspec.c
index 0775358d96..fb89bce1db 100644
--- a/refspec.c
+++ b/refspec.c
@@ -85,7 +85,7 @@ static int parse_refspec(struct refspec_item *item, const char *refspec, int fet
if (!*item->src)
return 0; /* negative refspecs must not be empty */
else if (llen == the_hash_algo->hexsz && !get_oid_hex(item->src, &unused))
- return 0; /* negative refpsecs cannot be exact sha1 */
+ return 0; /* negative refspecs cannot be exact sha1 */
else if (!check_refname_format(item->src, flags))
; /* valid looking ref is ok */
else