Display warning about local-only changes. Warns the user that they have changes not present on the remote.
(&self, local_only: &[String])
| 352 | /// |
| 353 | /// Warns the user that they have changes not present on the remote. |
| 354 | fn display_local_only_warning(&self, local_only: &[String]) { |
| 355 | print_blank(); |
| 356 | print_warning(&format!( |
| 357 | "You have {} not on the remote:", |
| 358 | format_count(local_only.len(), "local change") |
| 359 | )); |
| 360 | |
| 361 | // Show up to 5 local-only changes |
| 362 | for hash in local_only.iter().take(5) { |
| 363 | let hash_short = &hash[..12.min(hash.len())]; |
| 364 | println!(" {} {}...", warning("!"), hash_short); |
| 365 | } |
| 366 | |
| 367 | if local_only.len() > 5 { |
| 368 | println!(" ... and {} more", local_only.len() - 5); |
| 369 | } |
| 370 | |
| 371 | print_blank(); |
| 372 | print_hint("These changes exist locally but not on the remote."); |
| 373 | print_hint("Use 'atomic push' to upload them, or they will remain local-only."); |
| 374 | } |
| 375 | |
| 376 | /// Async implementation of the pull command. |
| 377 | /// |
no test coverage detected