feat: implement --new flag
The new `--new` or `-n` flag allows to create a new revision after the single revision being described. Running `jj-cz --new` is the equivalent of running `jj-cz @ && jj new`. Running `jj-cz --new xs` is the equivalent of running `jj-cz xs && jj new xs`. Passing several revisions to `jj-cz` with the `--new` flag will result in an error. Refs: #6
This commit is contained in:
@@ -31,6 +31,8 @@ pub enum Error {
|
||||
RevsetResolutionError { revset: String, context: String },
|
||||
#[error("Revision set '{revset}' resolves to multiple commits; specify a single revision")]
|
||||
MultipleRevisions { revset: String },
|
||||
#[error("--new cannot be used with multiple revisions")]
|
||||
NewFlagWithMultipleRevisions,
|
||||
}
|
||||
|
||||
impl From<ScopeError> for Error {
|
||||
|
||||
Reference in New Issue
Block a user