diff options
Diffstat (limited to 'src/lib/git/identify_ahead_behind.rs')
| -rw-r--r-- | src/lib/git/identify_ahead_behind.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/git/identify_ahead_behind.rs b/src/lib/git/identify_ahead_behind.rs index c98c994..d736522 100644 --- a/src/lib/git/identify_ahead_behind.rs +++ b/src/lib/git/identify_ahead_behind.rs | |||
| @@ -16,7 +16,7 @@ pub fn identify_ahead_behind( | |||
| 16 | name.to_string(), | 16 | name.to_string(), |
| 17 | git_repo | 17 | git_repo |
| 18 | .get_tip_of_branch(name) | 18 | .get_tip_of_branch(name) |
| 19 | .context(format!("cannot find from_branch '{name}'"))?, | 19 | .context(format!("failed to find from_branch '{name}'"))?, |
| 20 | ), | 20 | ), |
| 21 | None => ( | 21 | None => ( |
| 22 | if let Ok(name) = git_repo.get_checked_out_branch_name() { | 22 | if let Ok(name) = git_repo.get_checked_out_branch_name() { |
| @@ -38,7 +38,7 @@ pub fn identify_ahead_behind( | |||
| 38 | name.to_string(), | 38 | name.to_string(), |
| 39 | git_repo | 39 | git_repo |
| 40 | .get_tip_of_branch(name) | 40 | .get_tip_of_branch(name) |
| 41 | .context(format!("cannot find to_branch '{name}'"))?, | 41 | .context(format!("failed to find to_branch '{name}'"))?, |
| 42 | ), | 42 | ), |
| 43 | None => { | 43 | None => { |
| 44 | let (name, commit) = git_repo | 44 | let (name, commit) = git_repo |
| @@ -82,7 +82,7 @@ mod tests { | |||
| 82 | identify_ahead_behind(&git_repo, &Some(branch_name.to_string()), &None) | 82 | identify_ahead_behind(&git_repo, &Some(branch_name.to_string()), &None) |
| 83 | .unwrap_err() | 83 | .unwrap_err() |
| 84 | .to_string(), | 84 | .to_string(), |
| 85 | format!("cannot find from_branch '{}'", &branch_name), | 85 | format!("failed to find from_branch '{}'", &branch_name), |
| 86 | ); | 86 | ); |
| 87 | Ok(()) | 87 | Ok(()) |
| 88 | } | 88 | } |
| @@ -98,7 +98,7 @@ mod tests { | |||
| 98 | identify_ahead_behind(&git_repo, &None, &Some(branch_name.to_string())) | 98 | identify_ahead_behind(&git_repo, &None, &Some(branch_name.to_string())) |
| 99 | .unwrap_err() | 99 | .unwrap_err() |
| 100 | .to_string(), | 100 | .to_string(), |
| 101 | format!("cannot find to_branch '{}'", &branch_name), | 101 | format!("failed to find to_branch '{}'", &branch_name), |
| 102 | ); | 102 | ); |
| 103 | Ok(()) | 103 | Ok(()) |
| 104 | } | 104 | } |