mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-11 15:51:01 +00:00
fix(git-state): Fix discrepancy between v0.44.0 and master (#1672)
This commit is contained in:
parent
6426bbe3e4
commit
a245d54cdb
@ -1075,7 +1075,7 @@ that information will be shown too.
|
|||||||
| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. |
|
| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. |
|
||||||
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
|
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
|
||||||
| `style` | `"bold yellow"` | The style for the module. |
|
| `style` | `"bold yellow"` | The style for the module. |
|
||||||
| `format` | `"[\\($state( $progress_current/$progress_total)\\)]($style) "` | The format for the module. |
|
| `format` | `"\\([$state( $progress_current/$progress_total)]($style)\\) "` | The format for the module. |
|
||||||
| `disabled` | `false` | Disables the `git_state` module. |
|
| `disabled` | `false` | Disables the `git_state` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
@ -27,7 +27,7 @@ impl<'a> RootModuleConfig<'a> for GitStateConfig<'a> {
|
|||||||
am: "AM",
|
am: "AM",
|
||||||
am_or_rebase: "AM/REBASE",
|
am_or_rebase: "AM/REBASE",
|
||||||
style: "bold yellow",
|
style: "bold yellow",
|
||||||
format: "[\\($state( $progress_current/$progress_total)\\)]($style) ",
|
format: "\\([$state( $progress_current/$progress_total)]($style)\\) ",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
||||||
|
|
||||||
let expected = Some(format!("{} ", Color::Yellow.bold().paint("(REBASING 1/1)")));
|
let expected = Some(format!("({}) ", Color::Yellow.bold().paint("REBASING 1/1")));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
repo_dir.close()
|
repo_dir.close()
|
||||||
@ -205,7 +205,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
||||||
|
|
||||||
let expected = Some(format!("{} ", Color::Yellow.bold().paint("(MERGING)")));
|
let expected = Some(format!("({}) ", Color::Yellow.bold().paint("MERGING")));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
repo_dir.close()
|
repo_dir.close()
|
||||||
@ -221,8 +221,8 @@ mod tests {
|
|||||||
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
||||||
|
|
||||||
let expected = Some(format!(
|
let expected = Some(format!(
|
||||||
"{} ",
|
"({}) ",
|
||||||
Color::Yellow.bold().paint("(CHERRY-PICKING)")
|
Color::Yellow.bold().paint("CHERRY-PICKING")
|
||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
@ -238,7 +238,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
||||||
|
|
||||||
let expected = Some(format!("{} ", Color::Yellow.bold().paint("(BISECTING)")));
|
let expected = Some(format!("({}) ", Color::Yellow.bold().paint("BISECTING")));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
repo_dir.close()
|
repo_dir.close()
|
||||||
@ -253,7 +253,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
let actual = ModuleRenderer::new("git_state").path(path).collect();
|
||||||
|
|
||||||
let expected = Some(format!("{} ", Color::Yellow.bold().paint("(REVERTING)")));
|
let expected = Some(format!("({}) ", Color::Yellow.bold().paint("REVERTING")));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
repo_dir.close()
|
repo_dir.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user