Skip to content

Commit fd34fcc

Browse files
fmt: Reflow comments after cargo +nightly fmt -all
1 parent 1a37ead commit fd34fcc

3 files changed

Lines changed: 24 additions & 27 deletions

File tree

cli/src/cli_util.rs

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,10 @@ impl CommandHelper {
503503
}
504504

505505
// We detected the working copy was stale and the client is
506-
// configured to auto-update-stale, so let's do
507-
// that now. We need to do it up here, not at a
508-
// lower level (e.g. inside snapshot_working_copy()) to avoid
509-
// recursive locking of the working copy.
506+
// configured to auto-update-stale, so let's do that now. We
507+
// need to do it up here, not at a lower level (e.g. inside
508+
// snapshot_working_copy()) to avoid recursive locking of the
509+
// working copy.
510510
let WorkspaceCommandHelper { workspace, env, .. } = workspace_command;
511511
self.recover_stale_working_copy_impl(ui, workspace, env, &git_import_export_lock)
512512
.await?
@@ -647,10 +647,9 @@ impl CommandHelper {
647647
workspace_command.check_working_copy_writable()?;
648648

649649
// Snapshot the current working copy on top of the last known
650-
// working-copy operation, then merge the
651-
// divergent operations. The wc_commit_id of the
652-
// merged repo wouldn't change because the old one wins, but
653-
// it's probably fine if we picked the new
650+
// working-copy operation, then merge the divergent operations.
651+
// The wc_commit_id of the merged repo wouldn't change because
652+
// the old one wins, but it's probably fine if we picked the new
654653
// wc_commit_id.
655654
let stale_stats = workspace_command
656655
.snapshot_working_copy(ui, git_import_export_lock)
@@ -1682,8 +1681,8 @@ to the current parents may contain changes from multiple commits.
16821681
.ok()
16831682
.map(jj_lib::file_util::expand_home_path)?;
16841683
// The configured path is usually absolute, but if it's
1685-
// relative, the "git" command would read the
1686-
// file at the work-tree directory.
1684+
// relative, the "git" command would read the file at the
1685+
// work-tree directory.
16871686
Some(self.workspace_root().join(path))
16881687
} else {
16891688
xdg_config_home().map(|x| x.join("git").join("ignore"))
@@ -2204,8 +2203,7 @@ to the current parents may contain changes from multiple commits.
22042203
.await
22052204
.map_err(snapshot_command_error)?;
22062205
// export_refs() is probably unnecessary because there
2207-
// should be no rewritten descendants,
2208-
// but it's harmless.
2206+
// should be no rewritten descendants, but it's harmless.
22092207
let stats =
22102208
jj_lib::git::export_refs(mut_repo).map_err(snapshot_command_error)?;
22112209
crate::git_util::print_git_export_stats(ui, &stats)
@@ -2578,17 +2576,17 @@ to the current parents may contain changes from multiple commits.
25782576
}
25792577

25802578
// Hint that the user might want to `jj new` to the first conflict
2581-
// commit to resolve conflicts. Only show the hints if there
2582-
// were any new or resolved conflicts, and only if there are
2583-
// still some conflicts.
2579+
// commit to resolve conflicts. Only show the hints if there were any
2580+
// new or resolved conflicts, and only if there are still some
2581+
// conflicts.
25842582
if !(added_conflict_commits.is_empty()
25852583
|| resolved_conflicts_by_change_id.is_empty() && new_conflicts_by_change_id.is_empty())
25862584
{
25872585
// If the user just resolved some conflict and squashed them in,
2588-
// there won't be any new conflicts. Clarify to them
2589-
// that there are still some other conflicts to resolve.
2590-
// (We don't mention conflicts in commits that weren't affected by
2591-
// the operation, however.)
2586+
// there won't be any new conflicts. Clarify to them that there are
2587+
// still some other conflicts to resolve. (We don't mention
2588+
// conflicts in commits that weren't affected by the operation,
2589+
// however.)
25922590
if new_conflicts_by_change_id.is_empty() {
25932591
writeln!(
25942592
fmt,
@@ -3172,8 +3170,9 @@ pub fn print_conflicted_paths(
31723170
);
31733171
}
31743172
// TODO: We might decide it's OK for `jj resolve` to ignore special
3175-
// files in the `removes` of a conflict (see e.g. https://github.com/jj-vcs/jj/pull/978). In
3176-
// that case, `conflict.removes` should be removed below.
3173+
// files in the `removes` of a conflict (see e.g.
3174+
// https://github.com/jj-vcs/jj/pull/978). In that case,
3175+
// `conflict.removes` should be removed below.
31773176
for term in itertools::chain(conflict.removes(), conflict.adds()).flatten() {
31783177
seen_objects.insert(
31793178
match term {
@@ -3669,8 +3668,7 @@ pub async fn compute_commit_location(
36693668
)
36703669
.await?;
36713670
// Not using `RevsetExpression::parents` here to persist the
3672-
// order of parents specified in
3673-
// `before_commits`.
3671+
// order of parents specified in `before_commits`.
36743672
let new_parent_ids = before_commits
36753673
.iter()
36763674
.flat_map(|commit| commit.parent_ids())

cli/src/merge_tools/builtin.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,8 +2342,7 @@ mod tests {
23422342
}
23432343
if !did_file_exist && is_anything_selected {
23442344
// File was created, so if any changes are selected,
2345-
// then so must the file
2346-
// mode change.
2345+
// then so must the file mode change.
23472346
file.sections[0].set_checked(true);
23482347
}
23492348
}

cli/src/merge_tools/external.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ pub async fn run_mergetool_external(
370370
}
371371
Err(err) => {
372372
// Some conflicts were already resolved, so we should return an
373-
// error with the partially-resolved tree so
374-
// that the caller can save the resolved files.
373+
// error with the partially-resolved tree so that the caller can
374+
// save the resolved files.
375375
partial_resolution_error = Some(MergeToolPartialResolutionError {
376376
source: err,
377377
resolved_count: i,

0 commit comments

Comments
 (0)