Skip to content

Commit

Permalink
Merge pull request #285 from epage/config
Browse files Browse the repository at this point in the history
fix(alias): Auto-detect user config file
  • Loading branch information
epage authored Jan 18, 2023
2 parents b74385a + 7d7a27b commit 8a5e923
Show file tree
Hide file tree
Showing 3 changed files with 377 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bin/git-stack/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn register(_colored_stdout: bool, colored_stderr: bool) -> proc_exit::ExitResul

let mut user_config = git2::Config::open_default()
.with_code(proc_exit::Code::FAILURE)?
.open_level(git2::ConfigLevel::XDG)
.open_global()
.with_code(proc_exit::Code::FAILURE)?;

let stderr_palette = if colored_stderr {
Expand Down Expand Up @@ -105,7 +105,7 @@ fn unregister(_colored_stdout: bool, colored_stderr: bool) -> proc_exit::ExitRes

let mut user_config = git2::Config::open_default()
.with_code(proc_exit::Code::FAILURE)?
.open_level(git2::ConfigLevel::XDG)
.open_global()
.with_code(proc_exit::Code::FAILURE)?;

let stderr_palette = if colored_stderr {
Expand Down Expand Up @@ -216,7 +216,7 @@ fn status(colored_stdout: bool, colored_stderr: bool) -> proc_exit::ExitResult {
.paint(format_args!(" {} = {}", name, value)),
stdout_palette
.hint
.paint(format_args!(" # instead of \"{}\"", alias.action))
.paint(format_args!(" # instead of `{}`", alias.action))
);
}
covered.insert(name.to_owned());
Expand Down
Loading

0 comments on commit 8a5e923

Please sign in to comment.