pub struct ExternalMergeTool {
pub program: String,
pub diff_args: Vec<String>,
pub diff_expected_exit_codes: Vec<i32>,
pub diff_invocation_mode: DiffToolMode,
pub diff_do_chdir: bool,
pub edit_args: Vec<String>,
pub merge_args: Vec<String>,
pub merge_conflict_exit_codes: Vec<i32>,
pub merge_tool_edits_conflict_markers: bool,
pub conflict_marker_style: Option<ConflictMarkerStyle>,
}
Expand description
Merge/diff tool loaded from the settings.
Fields§
§program: String
Program to execute. Must be defined; defaults to the tool name if not specified in the config.
diff_args: Vec<String>
Arguments to pass to the program when generating diffs.
$left
and $right
are replaced with the corresponding directories.
diff_expected_exit_codes: Vec<i32>
Exit codes to be treated as success when generating diffs.
diff_invocation_mode: DiffToolMode
Whether to execute the tool with a pair of directories or individual files.
diff_do_chdir: bool
Whether to execute the tool in the temporary diff directory
edit_args: Vec<String>
Arguments to pass to the program when editing diffs.
$left
and $right
are replaced with the corresponding directories.
merge_args: Vec<String>
Arguments to pass to the program when resolving 3-way conflicts.
$left
, $right
, $base
, and $output
are replaced with
paths to the corresponding files.
merge_conflict_exit_codes: Vec<i32>
By default, if a merge tool exits with a non-zero exit code, then the
merge will be cancelled. Some merge tools allow leaving some conflicts
unresolved, in which case they will be left as conflict markers in the
output file. In that case, the merge tool may exit with a non-zero exit
code to indicate that not all conflicts were resolved. Adding an exit
code to this array will tell jj
to interpret that exit code as
indicating that the $output
file should contain conflict markers.
merge_tool_edits_conflict_markers: bool
If false (default), the $output
file starts out empty and is accepted
as a full conflict resolution as-is by jj
after the merge tool is
done with it. If true, the $output
file starts out with the
contents of the conflict, with the configured conflict markers. After
the merge tool is done, any remaining conflict markers in the
file are parsed and taken to mean that the conflict was only partially
resolved.
conflict_marker_style: Option<ConflictMarkerStyle>
If provided, overrides the normal conflict marker style setting. This is useful if a tool parses conflict markers, and so it requires a specific format, or if a certain format is more readable than another.
Implementations§
Source§impl ExternalMergeTool
impl ExternalMergeTool
pub fn with_program(program: impl Into<String>) -> Self
pub fn with_diff_args(command_args: &CommandNameAndArgs) -> Self
pub fn with_edit_args(command_args: &CommandNameAndArgs) -> Self
pub fn with_merge_args(command_args: &CommandNameAndArgs) -> Self
Trait Implementations§
Source§impl Clone for ExternalMergeTool
impl Clone for ExternalMergeTool
Source§fn clone(&self) -> ExternalMergeTool
fn clone(&self) -> ExternalMergeTool
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ExternalMergeTool
impl Debug for ExternalMergeTool
Source§impl Default for ExternalMergeTool
impl Default for ExternalMergeTool
Source§impl<'de> Deserialize<'de> for ExternalMergeToolwhere
ExternalMergeTool: Default,
impl<'de> Deserialize<'de> for ExternalMergeToolwhere
ExternalMergeTool: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ExternalMergeTool
impl PartialEq for ExternalMergeTool
impl Eq for ExternalMergeTool
impl StructuralPartialEq for ExternalMergeTool
Auto Trait Implementations§
impl Freeze for ExternalMergeTool
impl RefUnwindSafe for ExternalMergeTool
impl Send for ExternalMergeTool
impl Sync for ExternalMergeTool
impl Unpin for ExternalMergeTool
impl UnwindSafe for ExternalMergeTool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more