Fairly straightforward patch. Only change of note is that pijul::remote
can no longer directly implement remote-finding on the Repository
struct directly, so a new function has been exposed instead. There may be more ergonomic ways to solve this, but that is outside the scope of this patch.
ABQDWHNGSBF2REQDCGXSBFAU4RUMXYAF2KHJ5O3D32M7Z3A3FEDAC
BPCAJCLTVK2GVWYURWJTPQ6XA34JUJZNZHG6ONX4ARM3QPJJ6UPQC
YK7EBTF6LAPMYEHPPOUKHO3IQTA4MTKOEI77I4UWXTM4T475QKRAC
DDJO7X2P2BAJSXPOE6ODKAJM7GRWKPT36WWTUZ373ZWQRYU4CFIAC
4RV7T4SRYIQLBW3EZFWBO5G65QAVG2GHPI4KMDDZERCX65KQWSPQC
WCA7X6W633OI72GFB4QPQKAF3POVTBB5HO2NRSVBJRO5BUJL2ORQC
ZSFJT4SFIAS7WBODRZOFKKG4SVYBC5PC6XY75WYN7CCQ3SMV7IUQC
L4JXJHWXYNCL4QGJXNKKTOKKTAXKKXBJUUY7HFZGEUZ5A2V5H34QC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
76PCXGML77EZWTRI5E6KHLVRAFTJ2AB5YRN5EKOYNAPKTWY2KCGAC
MEK57BADGFCCZDNPUPUZGOJGNNS5R7UWRWCNJELKONGKOLLAQDDAC
A3RM526Y7LUXNYW4TL56YKQ5GVOK2R5D7JJVTSQ6TT5MEXIR6YAAC
H4AU6QRPRDRFW3V7NN5CJ6DHLEUBYGNLRZ5GYV6ULBGRMOPCJQXQC
TYAKEAJLABCZQDYAI4YBGIJNQ7HJS4DVULEGPCZOGJPJUYYNR6TAC
4KJ45IJLTIE35KQZUSFMFS67RNENG4P2FZMKMULJLGGYMKJUVRSQC
4OJWMSOWWNT5N4W4FDMKBZB5UARCLGV3SRZVKGR4EFAYFUMUHM7AC
LZOGKBJXRQJKXHYNNENJFGNLP5SHIXGSV6HDB7UVOP7FSA5EUNCQC
DO2Y5TY5JQISUHCVNPI2FXO7WWZVJQ3LGPW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l Repository {
pub async fn remote(
&self,
self_path: Option<&Path>,
// User name in case it isn't provided in the `name` argument already.
user: Option<&str>,
name: &str,
channel: &str,
no_cert_check: bool,
with_path: bool,
) -> Result<RemoteRepo, anyhow::Error> {
if let Some(name) = self.config.remotes.iter().find(|e| e.name() == name) {
name.to_remote(channel, no_cert_check, with_path).await
} else {
unknown_remote(self_path, user, name, channel, no_cert_check, with_path).await
}
pub async fn repository(
repo: &Repository,
self_path: Option<&Path>,
// User name in case it isn't provided in the `name` argument already.
user: Option<&str>,
name: &str,
channel: &str,
no_cert_check: bool,
with_path: bool,
) -> Result<RemoteRepo, anyhow::Error> {
if let Some(name) = repo.config.remotes.iter().find(|e| e.name() == name) {
name.to_remote(channel, no_cert_check, with_path).await
} else {
unknown_remote(self_path, user, name, channel, no_cert_check, with_path).await
use crate::remote::{PushDelta, RemoteDelta, RemoteRepo, CS};
use crate::repository::Repository;
use crate::remote::{self, PushDelta, RemoteDelta, RemoteRepo, CS};
let mut remote = repo
.remote(
Some(&repo.path),
None,
&remote_name,
remote_channel,
self.no_cert_check,
true,
)
.await?;
let mut remote = remote::repository(
&repo,
Some(&repo.path),
None,
&remote_name,
remote_channel,
self.no_cert_check,
true,
)
.await?;
let mut remote = repo
.remote(
Some(&repo.path),
None,
&remote_name,
from_channel,
self.no_cert_check,
true,
)
.await?;
let mut remote = remote::repository(
&repo,
Some(&repo.path),
None,
&remote_name,
from_channel,
self.no_cert_check,
true,
)
.await?;