Skip to content

Commit 9a16348

Browse files
committed
sess: only report checkout stage completion once
1 parent dc0265b commit 9a16348

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/sess.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,16 +1212,16 @@ impl<'io, 'sess: 'io, 'ctx: 'sess> SessionIo<'sess, 'ctx> {
12121212
Warnings::RevisionNotOnUpstream(revision.to_string(), name.to_string()).emit();
12131213
}
12141214
if clear == CheckoutState::ToClone {
1215-
let pb = Some(ProgressHandler::new(
1216-
self.sess.multiprogress.clone(),
1217-
GitProgressOps::Checkout,
1218-
name,
1219-
));
12201215
// Clone the working tree from the database, borrowing its
12211216
// objects via `--shared` (alternates) so nothing is copied and
12221217
// the database is left untouched. `--no-checkout` keeps the
12231218
// worktree empty so the exact revision can be checked out next;
1224-
// no temporary tag in the database is needed.
1219+
// no temporary tag in the database is needed. This step
1220+
// transfers no objects and writes no working-tree files, so it
1221+
// runs without its own progress handler: the user-facing
1222+
// progress and finish line come from the checkout below, and a
1223+
// separate handler here would report the dependency as "Checked
1224+
// out" twice.
12251225
git.clone()
12261226
.spawn_with(
12271227
move |c| {
@@ -1236,9 +1236,8 @@ impl<'io, 'sess: 'io, 'ctx: 'sess> SessionIo<'sess, 'ctx> {
12361236
.arg(path)
12371237
.arg("--shared")
12381238
.arg("--no-checkout")
1239-
.arg("--progress")
12401239
},
1241-
pb,
1240+
None,
12421241
)
12431242
.await?;
12441243
} else if clear == CheckoutState::ToCheckout {

0 commit comments

Comments
 (0)