Skip to content

Commit

Permalink
adapt to changes in git-repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Nov 29, 2022
1 parent becbd8d commit c4f68bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cargo-smart-release/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Context {
) -> anyhow::Result<Self> {
let meta = cargo_metadata::MetadataCommand::new().exec()?;
let root = meta.workspace_root.clone();
let repo = git::discover(&root)?.apply_environment();
let repo = git::discover(&root)?;
let crates_index = crate::crates_index::Index::new_cargo_default()?;
let history = (force_history_segmentation
|| matches!(bump, BumpSpec::Auto)
Expand Down
2 changes: 1 addition & 1 deletion gitoxide-core/src/hours/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ where
W: io::Write,
P: Progress,
{
let repo = git::discover(working_dir)?.apply_environment();
let repo = git::discover(working_dir)?;
let commit_id = repo.rev_parse_single(rev_spec)?.detach();
let mut string_heap = BTreeSet::<&'static [u8]>::new();
let needs_stats = file_stats || line_stats;
Expand Down
4 changes: 1 addition & 3 deletions gitoxide-core/src/index/checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ pub fn checkout_exclusive(
thread_limit,
}: index::checkout_exclusive::Options,
) -> anyhow::Result<()> {
let repo = repo
.map(|dir| git_repository::discover(dir).map(|r| r.apply_environment()))
.transpose()?;
let repo = repo.map(git_repository::discover).transpose()?;

let dest_directory = dest_directory.as_ref();
if dest_directory.exists() {
Expand Down
3 changes: 1 addition & 2 deletions src/plumbing/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ pub fn main() -> Result<()> {
mapping.full.modify(to_match_settings);
mapping.reduced.modify(to_match_settings);
let mut repo = git::ThreadSafeRepository::discover_opts(repository, Default::default(), mapping)
.map(git::Repository::from)
.map(|r| r.apply_environment())?;
.map(git::Repository::from)?;
if !config.is_empty() {
repo.config_snapshot_mut()
.append_config(config.iter(), git::config::Source::Cli)
Expand Down

0 comments on commit c4f68bf

Please sign in to comment.