Whether this invocation must be blocked until `--force` is supplied. Only a whole-working-copy restore (no paths named) is guarded, because it would discard *all* uncommitted work. Naming specific files is explicit consent (like `git restore `), and `--force` / `--dry-run` always bypass the guard.
(&self, has_changes: bool)
| 165 | /// explicit consent (like `git restore <file>`), and `--force` / |
| 166 | /// `--dry-run` always bypass the guard. |
| 167 | fn requires_force(&self, has_changes: bool) -> bool { |
| 168 | !self.is_partial() && has_changes && !self.force && !self.dry_run |
| 169 | } |
| 170 | |
| 171 | /// Message shown when there is nothing to restore. |
| 172 | /// |