src/pull: Support local pulls for collection–refs

Previously, collection–refs could only be pulled from a repository if it
had a summary file (which listed them). There was no way to pull from a
local repository which doesn’t have a summary file, and where the refs
were stored as refs/remotes/$remote/$ref, with a config section linking
that $remote to the queried collection ID.

Fix that by explicitly supporting pull_data->remote_repo_local in
fetch_ref_contents().

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1182
Approved by: cgwalters
This commit is contained in:
Philip Withnall authored and Atomic Bot committed 2017-09-27 14:44:00 +00:00
1 parent 5963d5a2a9
commit f923c2e1ea
2 files changed
+45 -14

No files matched your search

+1 -1
View File
@@ -508,5 +508,5 @@ rm ostree-srv/gnomerepo/summary
if ${CMD_PREFIX} ostree --repo=repo pull origin main 2>err.txt; then
fatal "pull of invalid ref succeeded"
fi
assert_file_has_content_literal err.txt 'error: Fetching refs/heads/main: Invalid rev lots of html here lots of html here lots of html here lots of'
assert_file_has_content_literal err.txt 'error: Fetching checksum for ref ((empty), main): Invalid rev lots of html here lots of html here lots of html here lots of'
echo "ok pull got HTML for a ref"