Display warning about local-only changes. Warns the user that they have changes not present on the remote.
(&self, local_only: &[String])
| 459 | /// |
| 460 | /// Warns the user that they have changes not present on the remote. |
| 461 | fn display_local_only_warning(&self, local_only: &[String]) { |
| 462 | print_blank(); |
| 463 | print_warning(&format!( |
| 464 | "You have {} not on the remote:", |
| 465 | format_count(local_only.len(), "local change") |
| 466 | )); |
| 467 | |
| 468 | // Show up to 5 local-only changes |
| 469 | for hash in local_only.iter().take(5) { |
| 470 | let hash_short = &hash[..12.min(hash.len())]; |
| 471 | println!(" {} {}...", warning("!"), hash_short); |
| 472 | } |
| 473 | |
| 474 | if local_only.len() > 5 { |
| 475 | println!(" ... and {} more", local_only.len() - 5); |
| 476 | } |
| 477 | |
| 478 | print_blank(); |
| 479 | print_hint("These changes exist locally but not on the remote."); |
| 480 | print_hint("Use 'atomic push' to upload them, or they will remain local-only."); |
| 481 | } |
| 482 | |
| 483 | /// Async implementation of the pull command. |
| 484 | /// |
no test coverage detected