lib/repo-pull: Fix remote names in refspecs from non-mirror P2P pulls
authorPhilip Withnall <withnall@endlessm.com>
Thu, 21 Sep 2017 15:08:26 +0000 (16:08 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 27 Sep 2017 16:38:07 +0000 (16:38 +0000)
commit9d8c1ec7dff18941b1cf2fac7328bffb25c63c1e
tree7e319ae3c30b9965636bc900be76be73e740d414
parent69e332a0c034b9d0e754372b3c9d653f492a97c7
lib/repo-pull: Fix remote names in refspecs from non-mirror P2P pulls

Propagate the refspec_name from the OstreeRemote returned by an
OstreeRepoFinder through to the set_ref() call.

This changes ostree_repo_pull_with_options() to accept the
previously-disallowed combination of passing override-remote-name in
options and also setting a remote name in remote_name_or_baseurl.
ostree_repo_pull_with_options() will continue to pull using the remote
config named in remote_name_or_baseurl as before; but will now use the
remote name from override-remote-name when it’s setting the refs at the
end of the pull. This is consistent with the documentation for
override-remote-name.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1202
Approved by: cgwalters
src/libostree/ostree-repo-pull.c