Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 5, 2024
1 parent 956bef6 commit 1b11142
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/cli/activate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand All @@ -78,7 +82,7 @@ impl Git {
touch_dir(&self.dir)?;
Ok((prev_rev, post_rev))
}

pub fn update(&self, gitref: Option<String>) -> Result<(String, String)> {
let gitref = gitref.map_or_else(|| self.current_branch(), Ok)?;
debug!("updating {} to {}", self.dir.display(), gitref);
Expand Down

0 comments on commit 1b11142

Please sign in to comment.