pub struct JjSandbox { /* private fields */ }Expand description
A throwaway jj repository (git-backed) with a repo-scoped identity.
Implementations§
Source§impl JjSandbox
impl JjSandbox
Sourcepub fn init(tag: &str) -> Self
pub fn init(tag: &str) -> Self
Create and initialise the repository (jj git init + repo-scoped
user.name/user.email).
The identity is supplied to every jj invocation as JJ_USER /
JJ_EMAIL env (see command), so the working-copy commit that
jj git init creates is authored deterministically — a later
config set --repo user.* only affects future commits and so cannot
fix the init commit on its own. The repo-scoped config is kept anyway
as belt-and-braces for any tool path that reads config over the env.
Sourcepub fn write(&self, path: &str, content: &str)
pub fn write(&self, path: &str, content: &str)
Write content to the workspace-relative path (creating parents).
Sourcepub fn describe(&self, message: &str)
pub fn describe(&self, message: &str)
Describe the working-copy change (jj describe -m <message>).
Sourcepub fn new_change(&self, message: &str)
pub fn new_change(&self, message: &str)
Start a new change on top (jj new -m <message>).
Auto Trait Implementations§
impl Freeze for JjSandbox
impl RefUnwindSafe for JjSandbox
impl Send for JjSandbox
impl Sync for JjSandbox
impl Unpin for JjSandbox
impl UnsafeUnpin for JjSandbox
impl UnwindSafe for JjSandbox
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more