From 1b11142309ef9a9f294382b7b037dbd16a3eecb7 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:07:42 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- docs/cli/activate.md | 2 +- mise.usage.kdl | 2 +- src/git.rs | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/cli/activate.md b/docs/cli/activate.md index 1e71938d64..e274248b2c 100644 --- a/docs/cli/activate.md +++ b/docs/cli/activate.md @@ -9,7 +9,7 @@ This should go into your shell's rc file or login shell. Otherwise, it will only take effect in the current session. (e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish) -Typically this can be added with something like the following: +Typically, this can be added with something like the following: echo 'eval "$(mise activate zsh)"' >> ~/.zshrc diff --git a/mise.usage.kdl b/mise.usage.kdl index d287a0a631..f91750542d 100644 --- a/mise.usage.kdl +++ b/mise.usage.kdl @@ -60,7 +60,7 @@ This should go into your shell's rc file or login shell. Otherwise, it will only take effect in the current session. (e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish) -Typically this can be added with something like the following: +Typically, this can be added with something like the following: echo 'eval "$(mise activate zsh)"' >> ~/.zshrc diff --git a/src/git.rs b/src/git.rs index df0b984e62..4958c0e85d 100644 --- a/src/git.rs +++ b/src/git.rs @@ -64,7 +64,11 @@ impl Git { self.dir.join(".git").is_dir() } - pub fn update_libgit2(&self, repo: &git2::Repository, gitref: &str) -> Result<(String, String)> { + pub fn update_libgit2( + &self, + repo: &git2::Repository, + gitref: &str, + ) -> Result<(String, String)> { let mut fetch_options = get_fetch_options()?; let mut remote = repo.find_remote("origin")?; remote.fetch(&[gitref], Some(&mut fetch_options), None)?; @@ -78,7 +82,7 @@ impl Git { touch_dir(&self.dir)?; Ok((prev_rev, post_rev)) } - + pub fn update(&self, gitref: Option) -> Result<(String, String)> { let gitref = gitref.map_or_else(|| self.current_branch(), Ok)?; debug!("updating {} to {}", self.dir.display(), gitref);