Display the state comparison between local and remote. Shows the user a summary of where local and remote are at, helping them understand what will be pushed. # Arguments `local_stack` - Name of the local stack `local_entries` - Local history entries `remote_stack` - Name of the remote stack `remote_state` - Current state of the remote `remote_entries` - Remote changelist entries
(
local_stack: &str,
local_entries: &[HistoryEntry],
remote_stack: &str,
remote_state: &StateResponse,
remote_entries: &[ChangelistEntry],
)
| 496 | /// * `remote_state` - Current state of the remote |
| 497 | /// * `remote_entries` - Remote changelist entries |
| 498 | pub fn display_state_comparison( |
| 499 | local_stack: &str, |
| 500 | local_entries: &[HistoryEntry], |
| 501 | remote_stack: &str, |
| 502 | remote_state: &StateResponse, |
| 503 | remote_entries: &[ChangelistEntry], |
| 504 | ) { |
| 505 | let local_state_str = format_local_state(local_entries); |
| 506 | let remote_state_str = format_remote_state(remote_state, remote_entries); |
| 507 | |
| 508 | println!( |
| 509 | " Local: {} at {}", |
| 510 | style_stack(local_stack), |
| 511 | info(&local_state_str) |
| 512 | ); |
| 513 | println!( |
| 514 | " Remote: {} at {}", |
| 515 | style_stack(remote_stack), |
| 516 | info(&remote_state_str) |
| 517 | ); |
| 518 | } |
| 519 | |
| 520 | /// Format the local state for display. |
| 521 | fn format_local_state(entries: &[HistoryEntry]) -> String { |
nothing calls this directly
no test coverage detected