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