Skip to content

Commit

Permalink
fix(forge remove): 🐛 Update remove function to prevent loss of all wo…
Browse files Browse the repository at this point in the history
…rking tree changes (gakonst#675)

Removed the "git checkout -- ." command.  This had the effect of clearing all uncommitted changes in tracked files from the working tree.

Fixes issue gakonst#673

Co-authored-by: Drake Evans <[email protected]>
  • Loading branch information
DrakeEvans and DrakeEvans authored Feb 6, 2022
1 parent 0460240 commit acb5cd4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions cli/src/forge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ fn remove(root: impl AsRef<std::path::Path>, dependencies: Vec<Dependency>) -> e
.spawn()?
.wait()?;

// tell git to discard the removal of the submodule
Command::new("git").args(&["checkout", "--", "."]).current_dir(&root).spawn()?.wait()?;

Ok(())
})
}

0 comments on commit acb5cd4

Please sign in to comment.