liboxen 0.46.12

Oxen is a fast, unstructured data version control, to help version large machine learning datasets written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
// Placeholder file, for unit test organization only
// `oxen add` currently does not have any unique logic in remote-mode

#[cfg(test)]
mod tests {

    use std::path::PathBuf;

    use crate::config::UserConfig;
    use crate::error::OxenError;
    use crate::model::NewCommitBody;
    use crate::model::staged_data::StagedDataOpts;
    use crate::opts::clone_opts::CloneOpts;
    use crate::{api, repositories, test, util};

    // TODO: Actual bugs unconvered:
    // 1: Err_files
    // 2: Adding modified files

    #[tokio::test]
    async fn test_remote_mode_add_file_with_full_path() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone an empty repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;
                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                // Create new file in repo
                let file_path = test::add_txt_file_to_dir(&cloned_repo.path, "new file contents")?;

                // Get status, should show untracked file
                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();
                let directory = ".".to_string();
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print();

                assert_eq!(status.untracked_files.len(), 1);

                // Add file
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![file_path],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Get status, should show staged file
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print();
                assert_eq!(status.untracked_files.len(), 0);
                assert_eq!(status.staged_files.len(), 1);

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }

    #[tokio::test]
    async fn test_remote_mode_add_file_with_relative_path() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone an empty repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;
                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                // Create new file in repo
                let file_path = test::add_txt_file_to_dir(&cloned_repo.path, "new file contents")?;

                // Get relative path
                let relative_path =
                    util::fs::path_relative_to_dir(&file_path, cloned_repo.path.clone())?;

                // Add file with full path
                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();
                let directory = ".".to_string();
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![relative_path],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Get status, should show staged file
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print();
                assert_eq!(status.untracked_files.len(), 0);
                assert_eq!(status.staged_files.len(), 1);

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }

    #[tokio::test]
    async fn test_remote_mode_add_file_with_canon_path() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone an empty repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;
                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                // Create new file in repo
                let file_path = test::add_txt_file_to_dir(&cloned_repo.path, "new file contents")?;

                // Get canon path
                let canon_path = util::fs::canonicalize(&file_path)?;

                // Add file with full path
                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();
                let directory = ".".to_string();
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![canon_path],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Get status, should show staged file
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print();
                assert_eq!(status.untracked_files.len(), 0);
                assert_eq!(status.staged_files.len(), 1);

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }

    #[tokio::test]
    async fn test_remote_mode_add_and_modify_file_in_new_subdir() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;

                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();

                // Create new file locally
                let subdir_path = PathBuf::from("new").join("dir");
                util::fs::create_dir_all(&subdir_path)?;

                let file_path = subdir_path.join("new_file.csv");
                let full_path = cloned_repo.path.join(&file_path);
                let file_contents = "cateory_1,category_2,category_3\nnew,file,contents";
                util::fs::write_to_path(&full_path, file_contents)?;

                // Status displays only the untracked file and dirs
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let directory = String::from(".");
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &PathBuf::from("."),
                    &status_opts,
                )
                .await?;

                status.print_with_params(&status_opts);

                assert_eq!(status.staged_files.len(), 0);
                assert_eq!(status.staged_dirs.len(), 0);
                assert_eq!(status.modified_files.len(), 0);
                assert_eq!(status.untracked_dirs.len(), 1);

                // Add the new file
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![full_path.clone()],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Status displays only the staged file and dirs
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;

                status.print_with_params(&status_opts);

                assert_eq!(status.staged_files.len(), 1);
                assert_eq!(status.staged_dirs.len(), 1);
                assert_eq!(status.modified_files.len(), 0);
                assert_eq!(status.untracked_dirs.len(), 0);
                assert!(status.staged_files.contains_key(&file_path));

                // Modify the file
                let file_contents = "file,label\ntrain/cat_1.jpg,1000";
                test::modify_txt_file(&full_path, file_contents)?;

                // Add the modified file
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![full_path.clone()],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Status now displays the modified as well as the staged entries
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print_with_params(&status_opts);

                assert_eq!(status.staged_files.len(), 1);
                assert_eq!(status.staged_dirs.len(), 1);
                // Note: While status should, in this case, display both a staged and a modified file,
                //       The current logic for regular status does not detect the modified file
                //       So this can be skipped for now
                //
                // assert_eq!(status.modified_files.len(), 1);
                // assert!(status.modified_files.contains(&file_path));
                assert_eq!(status.untracked_dirs.len(), 0);

                // Add the modified file
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![full_path.clone()],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Status again displays only the staged file
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print_with_params(&status_opts);

                assert_eq!(status.staged_files.len(), 1);
                assert_eq!(status.staged_dirs.len(), 1);
                assert_eq!(status.modified_files.len(), 0);
                assert_eq!(status.untracked_dirs.len(), 0);

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }

    // Note: The current behavior with untracked dirs is that we display just the dir with their 'item count'
    // This means we're looking for untracked dirs, as opposed to files, in the test below
    #[tokio::test]
    async fn test_remote_mode_add_multiple_files_in_sub_dir() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone an empty repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;
                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();
                let directory = ".".to_string();

                // Write three files to a subdirectory
                let training_data_dir = PathBuf::from("training_data");
                let sub_dir = cloned_repo.path.join(&training_data_dir);
                util::fs::create_dir_all(&sub_dir)?;

                let sub_file_1 = test::add_txt_file_to_dir(&sub_dir, "Hello")?;
                let sub_file_2 = test::add_txt_file_to_dir(&sub_dir, "World")?;
                let sub_file_3 = test::add_txt_file_to_dir(&sub_dir, "!")?;

                // Get status, should show untracked files
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;

                assert_eq!(status.untracked_dirs.len(), 1);
                assert_eq!(status.staged_files.len(), 0);

                // Add all three files
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![sub_file_1, sub_file_2, sub_file_3],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Status should now show the files as staged
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print();
                assert_eq!(status.untracked_dirs.len(), 0);
                assert_eq!(status.staged_files.len(), 3);

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }

    #[tokio::test]
    async fn test_remote_mode_add_files_with_glob_path() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone an empty repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;
                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();
                let directory = ".".to_string();

                // Write three files to the root dir
                let repo_dir = cloned_repo.path.clone();
                let _file_1 = test::add_txt_file_to_dir(&repo_dir, "Hello")?;
                let _file_2 = test::add_txt_file_to_dir(&repo_dir, "World")?;
                let _file_3 = test::add_txt_file_to_dir(&repo_dir, "!")?;

                // Write three files to a subdirectory
                let training_data_dir = PathBuf::from("training_data");
                let sub_dir = cloned_repo.path.join(&training_data_dir);
                util::fs::create_dir_all(&sub_dir)?;

                let _sub_file_1 = test::add_txt_file_to_dir(&sub_dir, "Hello")?;
                let _sub_file_2 = test::add_txt_file_to_dir(&sub_dir, "World")?;
                let _sub_file_3 = test::add_txt_file_to_dir(&sub_dir, "!")?;

                // Add all files with glob path
                let glob_path = PathBuf::from("*");
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![glob_path],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Status should now show the files as staged
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;

                status.print();

                assert_eq!(status.untracked_files.len(), 0);
                assert_eq!(status.untracked_dirs.len(), 0);
                assert_eq!(status.staged_files.len(), 6);
                // This includes the root dir
                assert_eq!(status.staged_dirs.len(), 2);

                // Write more files
                let file_path = PathBuf::from("new_file.txt");
                let full_path = cloned_repo.path.join(&file_path);
                let file_content = "new file".to_string();
                test::write_txt_file_to_path(&full_path, &file_content)?;

                let excluded_path = PathBuf::from("excluded.txt");
                let excluded_full_path = cloned_repo.path.join(&excluded_path);
                let excluded_content = "excluded".to_string();
                test::write_txt_file_to_path(&excluded_full_path, &excluded_content)?;

                let dir_path = PathBuf::from("new_dir");
                let full_dir_path = cloned_repo.path.join(&dir_path);
                util::fs::create_dir_all(&full_dir_path)?;

                let embedded_file = PathBuf::from("embedded.txt");
                let embedded_full_path = full_dir_path.join(embedded_file);
                let embedded_content = "embedded file".to_string();
                test::write_txt_file_to_path(&embedded_full_path, &embedded_content)?;

                // Adding `n*` should add both the new file and new dir
                let glob_path2 = PathBuf::from("n*");
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![glob_path2],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Verify new paths were added
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;

                status.print();

                assert_eq!(status.untracked_files.len(), 1);
                assert_eq!(status.untracked_dirs.len(), 0);
                assert_eq!(status.staged_files.len(), 8);
                // This includes the root dir
                assert_eq!(status.staged_dirs.len(), 3);

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }

    #[tokio::test]
    async fn test_remote_mode_add_dir_recursive() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone an empty repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;
                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();
                let directory = ".".to_string();

                // Create a directory with a nested structure
                let new_dir = cloned_repo.path.join("new");
                let train_dir = new_dir.join("train");
                let test_dir = new_dir.join("test");

                util::fs::create_dir_all(&train_dir)?;
                util::fs::create_dir_all(&test_dir)?;

                let _ = test::add_txt_file_to_dir(&new_dir, "text 1")?;
                let _ = test::add_txt_file_to_dir(&train_dir, "text 2")?;
                let _ = test::add_txt_file_to_dir(&train_dir, "text 3")?;
                let _ = test::add_txt_file_to_dir(&test_dir, "text 4")?;

                // Add the top-level directory
                // TODO: Check how many files were added
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![new_dir.clone()],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Check status for all staged files
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print();
                assert_eq!(status.staged_dirs.len(), 3);
                assert_eq!(status.staged_files.len(), 4);

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }

    #[tokio::test]
    async fn test_remote_mode_cannot_add_if_not_modified() -> Result<(), OxenError> {
        test::run_remote_repo_test_bounding_box_csv_pushed(|_local_repo, remote_repo| async move {
            let remote_repo_copy = remote_repo.clone();

            test::run_empty_dir_test_async(|dir| async move {
                // Clone an empty repo in remote mode
                let mut opts = CloneOpts::new(&remote_repo.remote.url, dir.join("new_repo"));
                opts.is_remote = true;
                let cloned_repo = repositories::clone(&opts).await?;
                assert!(cloned_repo.is_remote_mode());

                let workspace_identifier = cloned_repo.workspace_name.clone().unwrap();
                let directory = ".".to_string();

                // Create a file, add it, and commit it
                let dir_path = cloned_repo.path.join("dir");
                util::fs::create_dir_all(&dir_path)?;
                let hello_file_path = test::add_txt_file_to_dir(&dir_path, "hello.txt")?;

                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![hello_file_path.clone()],
                    &Some(cloned_repo.clone()),
                )
                .await?;
                let cfg = UserConfig::get()?;
                let body = NewCommitBody {
                    message: "Add text file".to_string(),
                    author: cfg.name,
                    email: cfg.email,
                };
                repositories::remote_mode::commit(&cloned_repo, &body).await?;

                // Add again without modification
                api::client::workspaces::files::add(
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    vec![hello_file_path.clone()],
                    &Some(cloned_repo.clone()),
                )
                .await?;

                // Verify repo is still clean
                let status_opts =
                    StagedDataOpts::from_paths_remote_mode(std::slice::from_ref(&cloned_repo.path));
                let status = repositories::remote_mode::status(
                    &cloned_repo,
                    &remote_repo,
                    &workspace_identifier,
                    &directory,
                    &status_opts,
                )
                .await?;
                status.print();
                assert!(status.is_clean());

                Ok(())
            })
            .await?;

            Ok(remote_repo_copy)
        })
        .await
    }
}