Clarify field that is a path description, not a path

pull/614/head
Wilfred Hughes 2023-12-29 19:47:39 +07:00
parent 5d2a4777dc
commit b71c553d07
2 changed files with 6 additions and 6 deletions

@ -222,7 +222,7 @@ fn main() {
lhs_path,
rhs_path,
display_path,
old_path,
renamed,
} => {
if lhs_path == rhs_path {
let is_dir = match &lhs_path {
@ -297,7 +297,7 @@ fn main() {
_ => {
let diff_result = diff_file(
&display_path,
old_path,
renamed,
&lhs_path,
&rhs_path,
&display_options,

@ -376,8 +376,8 @@ pub(crate) enum Mode {
rhs_path: FileArgument,
/// The path that we show to the user.
display_path: String,
/// If this file has been renamed, the name it had previously.
old_path: Option<String>,
/// If this file has been renamed, a description of the change.
renamed: Option<String>,
},
DiffFromConflicts {
diff_options: DiffOptions,
@ -635,7 +635,7 @@ pub(crate) fn parse_args() -> Mode {
info!("CLI arguments: {:?}", args);
// TODO: document these different ways of calling difftastic.
let (display_path, lhs_path, rhs_path, old_path) = match &args[..] {
let (display_path, lhs_path, rhs_path, renamed) = match &args[..] {
[lhs_path, rhs_path] => {
let lhs_arg = FileArgument::from_cli_argument(lhs_path);
let rhs_arg = FileArgument::from_cli_argument(rhs_path);
@ -725,7 +725,7 @@ pub(crate) fn parse_args() -> Mode {
lhs_path,
rhs_path,
display_path,
old_path,
renamed,
}
}