Commit 74ca83b4 authored by Ben Boeckel's avatar Ben Boeckel

GitWorkArea: require a mutable reference to checkout files

parent 98269322
Pipeline #78357 passed with stage
......@@ -2,6 +2,9 @@
* The `MergeCommand::author_date` method now takes a `DateTime<Utc>` rather
than a reference.
* The `GitWorkArea::checkout` method now requires a mutable reference. This
is because checking out locks the index which means that it cannot be
shared while performing this action.
# v3.1.2
......@@ -618,7 +618,7 @@ impl GitWorkArea {
/// and fixes up Git's knowledge that they are there.
/// All paths supported by Git's globbing and searching mechanisms are supported.
pub fn checkout<I, P>(&self, paths: I) -> Result<()>
pub fn checkout<I, P>(&mut self, paths: I) -> Result<()>
where I: IntoIterator<Item = P>,
P: AsRef<OsStr>,
......@@ -780,7 +780,7 @@ fn test_work_area_checkout() {
let base = CommitId::new(ARBITRARY_COMMIT);
let ctx = git_context(tempdir.path());
let workarea = ctx.prepare(&base).unwrap();
let mut workarea = ctx.prepare(&base).unwrap();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment