OSWFAKWMXL7N3ZHL74TKXEUDGSBDUHBNFAPI25LUB6RBTQKFC6EQC
Y2Y4OOIECVVLL5KIUVHIWJTGPADACCZZHUFGHTLSWHXS5UJ5FD4QC
G7HJHNFDZCGOPGVETNYK7BDDPJXHEIPGZJEJXBGBXSWPWEX3BIQQC
QQS7LII4MKQWKPYJXSZVOKLZ2ZSWQOMHHE6T22DJ4CL5I6YRGJLQC
GKSVBEUW7Q2M4QPKPHOUPGP36AMXMJVGX7KCSNYXEFQZOURGBSMQC
L4JXJHWXYNCL4QGJXNKKTOKKTAXKKXBJUUY7HFZGEUZ5A2V5H34QC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
SLJ3OHD4F6GJGZ3SV2D7DMR3PXYHPSI64X77KZ3RJ24EGEX6ZNQAC
MU5GSJAW65PEG3BRYUKZ7O37BPHW3MOX3S5E2RFOXKGUOJEEDQ5AC
KWAMD2KR5UYRHHPZWL7GY2KQKNXNVS4BYBVK3FXDI23NQMWA3U4QC
RUBBHYZ7MCLKJIHZ3EWEC3JR3FSKOU4T2NH7KRBG7ECAU4JF3LUAC
4H2XTVJ2BNXDNHQ3RQTMOG3I4NRGZT7JDLC2GRINS56TIYTYTO4QC
AEPEFS7O3YT7CRRFYQVJWUXUUSRGJ6K6XZQVK62B6N74UXOIFWYAC
367UBQ6KNAKUEWG32R4QRJ6H7IE7NAZFOPTC3ZOE4Z6E44RV3ISQC
EUZFFJSOWV4PXDFFPDAFBHFUUMOFEU6ST7JH57YYRRR2SEOXLN6QC
5OGOE4VWS5AIG4U2UYLLIGA3HY6UB7SNQOSESHNXBLET3VQXFBZAC
HQ2C4VT5O2IOUAQQTEAF7VIFNJFOZWBW2R5ACLK3TD4YZUXNZ77QC
ABQDWHNGSBF2REQDCGXSBFAU4RUMXYAF2KHJ5O3D32M7Z3A3FEDAC
/// Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a `.pijul` directory.
#[clap(long = "repository", value_hint = ValueHint::DirPath)]
repo_path: Option<PathBuf>,
/// Path to the repository. Uses the current repository if the argument is omitted
#[clap(long = "repository", value_hint = ValueHint::DirPath)]
repo_path: Option<PathBuf>,
#[clap(flatten)]
base: RepoPath,
/// Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a `.pijul` directory.
#[clap(long = "repository", value_hint = ValueHint::DirPath)]
repo_path: Option<PathBuf>,
#[clap(flatten)]
base: RepoPath,
let mut push_channel = None;
let remote_channel = if let Some(ref c) = self.to_channel {
let c = CHANNEL.captures(c).unwrap();
push_channel = c.get(3).map(|x| x.as_str());
let c = c.get(1).unwrap().as_str();
if c.is_empty() {
channel_name
} else {
c
}
} else {
channel_name
};
let (remote_channel, push_channel) = self
.to_channel
.as_deref()
.map(|c| {
let c = CHANNEL.captures(c).unwrap();
let push_channel = c.get(3).map(|x| x.as_str());
let remote_channel = Some(c.get(1).unwrap().as_str()).filter(|v| !v.is_empty());
(remote_channel, push_channel)
})
.unwrap_or_default();
let remote_channel = remote_channel.unwrap_or(&channel_name);
let cur = txn
.read()
.current_channel()
.unwrap_or(libpijul::DEFAULT_CHANNEL)
.to_string();
let channel_name = if let Some(ref c) = self.to_channel {
c
} else {
cur.as_str()
};
let is_current_channel = channel_name == cur;
let txn_read = txn.read();
let (channel_name, is_current_channel) =
get_channel(self.to_channel.as_deref(), &*txn_read);
let channel_name = channel_name.to_string();
drop(txn_read);
let from_channel = if let Some(ref c) = self.from_channel {
c
} else {
libpijul::DEFAULT_CHANNEL
};
let from_channel = self
.from_channel
.as_deref()
.unwrap_or(libpijul::DEFAULT_CHANNEL);