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
This commit is contained in:
Junio C Hamano
2026-04-01 10:28:19 -07:00
3 changed files with 15 additions and 1 deletions

View File

@@ -782,4 +782,11 @@ test_expect_success 'tag following always works over v0 http' '
test_cmp expect actual
'
test_expect_success 'ls-remote outside repo does not segfault with fetch refspec' '
nongit git \
-c remote.origin.url="$HTTPD_URL/smart/repo.git" \
-c remote.origin.fetch=anything \
ls-remote origin
'
test_done