Commit 7528699c authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

rust-status: refactor status into a struct

The code for `dirstate/status` has grown too large for comfort, this is the
first of three patches that try to improve maintainability.
In this patch, refactoring dirstate's status into a struct allows for slimming
down function signatures drastically, keeping the mental (and maintenance)
burden lower, since pretty much all of them shared a few common arguments.

This had the pleasant side-effect of simplifying lifetimes a little. This has
no observable impact on performance.

The next patch will add/improve documentation and refactor some types. I tried
to keep new code down to a minimum in this patch because it's already pretty
big.

Differential Revision: https://phab.mercurial-scm.org/D8661
parent 503d0dd2af18
This diff is collapsed.
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
let ((lookup, status_res), warnings) = status( let ((lookup, status_res), warnings) = status(
&dmap, &dmap,
&matcher, &matcher,
&root_dir, root_dir.to_path_buf(),
ignore_files, ignore_files,
StatusOptions { StatusOptions {
check_exec, check_exec,
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
let ((lookup, status_res), warnings) = status( let ((lookup, status_res), warnings) = status(
&dmap, &dmap,
&matcher, &matcher,
&root_dir, root_dir.to_path_buf(),
ignore_files, ignore_files,
StatusOptions { StatusOptions {
check_exec, check_exec,
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
let ((lookup, status_res), warnings) = status( let ((lookup, status_res), warnings) = status(
&dmap, &dmap,
&matcher, &matcher,
&root_dir, root_dir.to_path_buf(),
ignore_files, ignore_files,
StatusOptions { StatusOptions {
check_exec, check_exec,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment