diff -Nru rust-git2-curl-0.9.0/Cargo.toml rust-git2-curl-0.12.0/Cargo.toml --- rust-git2-curl-0.9.0/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ rust-git2-curl-0.12.0/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -11,14 +11,14 @@ # will likely look very different (and much more reasonable) [package] +edition = "2018" name = "git2-curl" -version = "0.9.0" -authors = ["Alex Crichton "] +version = "0.12.0" +authors = ["Josh Triplett ", "Alex Crichton "] description = "Backend for an HTTP transport in libgit2 powered by libcurl.\n\nIntended to be used with the git2 crate.\n" -homepage = "https://github.com/alexcrichton/git2-rs" documentation = "https://docs.rs/git2-curl" license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/git2-rs" +repository = "https://github.com/rust-lang/git2-rs" [[test]] name = "all" @@ -27,14 +27,14 @@ version = "0.4" [dependencies.git2] -version = "0.8" +version = "0.11" default-features = false [dependencies.log] version = "0.4" [dependencies.url] -version = "1.0" +version = "2.0" [dev-dependencies.civet] version = "0.11" diff -Nru rust-git2-curl-0.9.0/Cargo.toml.orig rust-git2-curl-0.12.0/Cargo.toml.orig --- rust-git2-curl-0.9.0/Cargo.toml.orig 2018-12-13 19:04:13.000000000 +0000 +++ rust-git2-curl-0.12.0/Cargo.toml.orig 2019-12-12 22:44:58.000000000 +0000 @@ -1,23 +1,23 @@ [package] name = "git2-curl" -version = "0.9.0" -authors = ["Alex Crichton "] +version = "0.12.0" +authors = ["Josh Triplett ", "Alex Crichton "] license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/git2-rs" -homepage = "https://github.com/alexcrichton/git2-rs" +repository = "https://github.com/rust-lang/git2-rs" documentation = "https://docs.rs/git2-curl" description = """ Backend for an HTTP transport in libgit2 powered by libcurl. Intended to be used with the git2 crate. """ +edition = "2018" [dependencies] curl = "0.4" -url = "1.0" +url = "2.0" log = "0.4" -git2 = { path = "..", version = "0.8", default-features = false } +git2 = { path = "..", version = "0.11", default-features = false } [dev-dependencies] civet = "0.11" diff -Nru rust-git2-curl-0.9.0/.cargo_vcs_info.json rust-git2-curl-0.12.0/.cargo_vcs_info.json --- rust-git2-curl-0.9.0/.cargo_vcs_info.json 1970-01-01 00:00:00.000000000 +0000 +++ rust-git2-curl-0.12.0/.cargo_vcs_info.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +1,5 @@ { "git": { - "sha1": "905d596e22b95805024fa7ab171bddcbb45f3cf9" + "sha1": "14233a28a8408f41498151648b9e014c36e8e611" } } diff -Nru rust-git2-curl-0.9.0/debian/cargo-checksum.json rust-git2-curl-0.12.0/debian/cargo-checksum.json --- rust-git2-curl-0.9.0/debian/cargo-checksum.json 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/cargo-checksum.json 2020-04-18 15:12:02.000000000 +0000 @@ -1 +1 @@ -{"package":"Could not get crate checksum","files":{}} +{"package":"d2559abb1d87d27668d31bd868a000f0e2e0065d10e78961b62da95d7a7f1cc7","files":{}} diff -Nru rust-git2-curl-0.9.0/debian/changelog rust-git2-curl-0.12.0/debian/changelog --- rust-git2-curl-0.9.0/debian/changelog 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/changelog 2020-04-18 15:12:02.000000000 +0000 @@ -1,3 +1,21 @@ +rust-git2-curl (0.12.0-1) unstable; urgency=medium + + * Package git2-curl 0.12.0 from crates.io using debcargo 2.4.2 + + -- Ximin Luo Sat, 18 Apr 2020 16:12:02 +0100 + +rust-git2-curl (0.11.0-2) unstable; urgency=medium + + * Package git2-curl 0.11.0 from crates.io using debcargo 2.4.0 + + -- Ximin Luo Thu, 28 Nov 2019 03:09:34 +0000 + +rust-git2-curl (0.11.0-1) unstable; urgency=medium + + * Package git2-curl 0.11.0 from crates.io using debcargo 2.4.0 + + -- Ximin Luo Thu, 28 Nov 2019 00:48:55 +0000 + rust-git2-curl (0.9.0-2) unstable; urgency=medium * Package git2-curl 0.9.0 from crates.io using debcargo 2.4.0 diff -Nru rust-git2-curl-0.9.0/debian/control rust-git2-curl-0.12.0/debian/control --- rust-git2-curl-0.9.0/debian/control 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/control 2020-04-18 15:12:02.000000000 +0000 @@ -7,16 +7,15 @@ rustc:native , libstd-rust-dev , librust-curl-0.4+default-dev , - librust-git2-0.8-dev , + librust-git2-0.11-dev , librust-log-0.4+default-dev , - librust-url-2+default-dev | librust-url-1+default-dev + librust-url-2+default-dev Maintainer: Debian Rust Maintainers Uploaders: Ximin Luo -Standards-Version: 4.2.0 +Standards-Version: 4.4.1 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/git2-curl] Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/git2-curl -Homepage: https://github.com/alexcrichton/git2-rs Package: librust-git2-curl-dev Architecture: any @@ -24,17 +23,17 @@ Depends: ${misc:Depends}, librust-curl-0.4+default-dev, - librust-git2-0.8-dev, + librust-git2-0.11-dev, librust-log-0.4+default-dev, - librust-url-2+default-dev | librust-url-1+default-dev + librust-url-2+default-dev Provides: librust-git2-curl+default-dev (= ${binary:Version}), librust-git2-curl-0-dev (= ${binary:Version}), librust-git2-curl-0+default-dev (= ${binary:Version}), - librust-git2-curl-0.9-dev (= ${binary:Version}), - librust-git2-curl-0.9+default-dev (= ${binary:Version}), - librust-git2-curl-0.9.0-dev (= ${binary:Version}), - librust-git2-curl-0.9.0+default-dev (= ${binary:Version}) + librust-git2-curl-0.12-dev (= ${binary:Version}), + librust-git2-curl-0.12+default-dev (= ${binary:Version}), + librust-git2-curl-0.12.0-dev (= ${binary:Version}), + librust-git2-curl-0.12.0+default-dev (= ${binary:Version}) Description: Backend for an HTTP transport in libgit2 powered by libcurl - Rust source code Intended to be used with the git2 crate. . diff -Nru rust-git2-curl-0.9.0/debian/copyright rust-git2-curl-0.12.0/debian/copyright --- rust-git2-curl-0.9.0/debian/copyright 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/copyright 2020-04-18 15:12:02.000000000 +0000 @@ -1,7 +1,9 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: git2-curl -Upstream-Contact: Alex Crichton -Source: https://github.com/alexcrichton/git2-rs +Upstream-Contact: + Josh Triplett + Alex Crichton +Source: https://github.com/rust-lang/git2-rs Files: * Copyright: 2014-2018 Alex Crichton @@ -9,8 +11,8 @@ Files: debian/* Copyright: - 2018 Debian Rust Maintainers - 2018 Ximin Luo + 2018-2020 Debian Rust Maintainers + 2018-2020 Ximin Luo License: MIT or Apache-2.0 License: Apache-2.0 diff -Nru rust-git2-curl-0.9.0/debian/copyright.debcargo.hint rust-git2-curl-0.12.0/debian/copyright.debcargo.hint --- rust-git2-curl-0.9.0/debian/copyright.debcargo.hint 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/copyright.debcargo.hint 2020-04-18 15:12:02.000000000 +0000 @@ -1,10 +1,14 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: git2-curl -Upstream-Contact: Alex Crichton -Source: https://github.com/alexcrichton/git2-rs +Upstream-Contact: + Josh Triplett + Alex Crichton +Source: https://github.com/rust-lang/git2-rs Files: * -Copyright: FIXME (overlay) UNKNOWN-YEARS Alex Crichton +Copyright: + FIXME (overlay) UNKNOWN-YEARS Josh Triplett + FIXME (overlay) UNKNOWN-YEARS Alex Crichton License: MIT or Apache-2.0 Comment: FIXME (overlay): Since upstream copyright years are not available in @@ -21,8 +25,8 @@ Files: debian/* Copyright: - 2018-2019 Debian Rust Maintainers - 2018-2019 Ximin Luo + 2018-2020 Debian Rust Maintainers + 2018-2020 Ximin Luo License: MIT or Apache-2.0 License: Apache-2.0 diff -Nru rust-git2-curl-0.9.0/debian/patches/relax-dep-versions.patch rust-git2-curl-0.12.0/debian/patches/relax-dep-versions.patch --- rust-git2-curl-0.9.0/debian/patches/relax-dep-versions.patch 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/patches/relax-dep-versions.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -34,7 +34,7 @@ - version = "0.4" - - [dependencies.url] --version = "1.0" -+version = ">= 1, < 3" - [dev-dependencies.civet] - version = "0.11" - diff -Nru rust-git2-curl-0.9.0/debian/patches/series rust-git2-curl-0.12.0/debian/patches/series --- rust-git2-curl-0.9.0/debian/patches/series 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -relax-dep-versions.patch diff -Nru rust-git2-curl-0.9.0/debian/tests/control rust-git2-curl-0.12.0/debian/tests/control --- rust-git2-curl-0.9.0/debian/tests/control 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/tests/control 2020-04-18 15:12:02.000000000 +0000 @@ -1,7 +1,9 @@ -Test-Command: /usr/share/cargo/bin/cargo-auto-test git2-curl 0.9.0 --all-targets --all-features +Test-Command: /usr/share/cargo/bin/cargo-auto-test git2-curl 0.12.0 --all-targets --all-features +Features: test-name=@ Depends: dh-cargo (>= 18), librust-civet-0.11+default-dev, librust-conduit-0.8+default-dev, librust-conduit-git-http-backend-0.8+default-dev, librust-tempfile-3+default-dev, @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test git2-curl 0.9.0 --all-targets --no-default-features -Depends: dh-cargo (>= 18), librust-civet-0.11+default-dev, librust-conduit-0.8+default-dev, librust-conduit-git-http-backend-0.8+default-dev, librust-tempfile-3+default-dev, librust-git2-curl-dev +Test-Command: /usr/share/cargo/bin/cargo-auto-test git2-curl 0.12.0 --all-targets --no-default-features +Features: test-name=librust-git2-curl-dev +Depends: dh-cargo (>= 18), librust-civet-0.11+default-dev, librust-conduit-0.8+default-dev, librust-conduit-git-http-backend-0.8+default-dev, librust-tempfile-3+default-dev, @ Restrictions: allow-stderr, skip-not-installable diff -Nru rust-git2-curl-0.9.0/debian/watch rust-git2-curl-0.12.0/debian/watch --- rust-git2-curl-0.9.0/debian/watch 2019-08-17 17:19:00.000000000 +0000 +++ rust-git2-curl-0.12.0/debian/watch 2020-04-18 15:12:02.000000000 +0000 @@ -2,4 +2,3 @@ opts=filenamemangle=s/.*\/(.*)\/download/git2-curl-$1\.tar\.gz/g,\ uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/git2-curl .*/crates/git2-curl/@ANY_VERSION@/download - diff -Nru rust-git2-curl-0.9.0/src/lib.rs rust-git2-curl-0.12.0/src/lib.rs --- rust-git2-curl-0.9.0/src/lib.rs 2018-10-11 22:57:26.000000000 +0000 +++ rust-git2-curl-0.12.0/src/lib.rs 2019-08-19 13:06:57.000000000 +0000 @@ -15,23 +15,22 @@ //! > **NOTE**: At this time this crate likely does not support a `git push` //! > operation, only clones. -#![doc(html_root_url = "http://alexcrichton.com/git2-rs")] - -extern crate git2; -extern crate curl; -extern crate url; -#[macro_use] extern crate log; +#![doc(html_root_url = "https://docs.rs/git2-curl/0.11")] +#![deny(missing_docs)] +#![warn(rust_2018_idioms)] +#![cfg_attr(test, deny(warnings))] use std::error; use std::io::prelude::*; use std::io::{self, Cursor}; use std::str; -use std::sync::{Once, ONCE_INIT, Arc, Mutex}; +use std::sync::{Arc, Mutex, Once}; use curl::easy::{Easy, List}; +use git2::transport::SmartSubtransportStream; +use git2::transport::{Service, SmartSubtransport, Transport}; use git2::Error; -use git2::transport::{SmartSubtransportStream}; -use git2::transport::{Transport, SmartSubtransport, Service}; +use log::{debug, info}; use url::Url; struct CurlTransport { @@ -40,7 +39,7 @@ /// /// This is an empty string until the first action is performed. /// If there is an HTTP redirect, this will be updated with the new URL. - base_url: Arc> + base_url: Arc>, } struct CurlSubtransport { @@ -70,48 +69,44 @@ /// This function may be called concurrently, but only the first `handle` will /// be used. All others will be discarded. pub unsafe fn register(handle: Easy) { - static INIT: Once = ONCE_INIT; + static INIT: Once = Once::new(); let handle = Arc::new(Mutex::new(handle)); let handle2 = handle.clone(); INIT.call_once(move || { - git2::transport::register("http", move |remote| { - factory(remote, handle.clone()) - }).unwrap(); - git2::transport::register("https", move |remote| { - factory(remote, handle2.clone()) - }).unwrap(); + git2::transport::register("http", move |remote| factory(remote, handle.clone())).unwrap(); + git2::transport::register("https", move |remote| factory(remote, handle2.clone())).unwrap(); }); } -fn factory(remote: &git2::Remote, handle: Arc>) - -> Result { - Transport::smart(remote, true, CurlTransport { - handle: handle, - base_url: Arc::new(Mutex::new(String::new())) - }) +fn factory(remote: &git2::Remote<'_>, handle: Arc>) -> Result { + Transport::smart( + remote, + true, + CurlTransport { + handle: handle, + base_url: Arc::new(Mutex::new(String::new())), + }, + ) } impl SmartSubtransport for CurlTransport { - fn action(&self, url: &str, action: Service) - -> Result, Error> { + fn action( + &self, + url: &str, + action: Service, + ) -> Result, Error> { let mut base_url = self.base_url.lock().unwrap(); if base_url.len() == 0 { *base_url = url.to_string(); } let (service, path, method) = match action { - Service::UploadPackLs => { - ("upload-pack", "/info/refs?service=git-upload-pack", "GET") - } - Service::UploadPack => { - ("upload-pack", "/git-upload-pack", "POST") - } + Service::UploadPackLs => ("upload-pack", "/info/refs?service=git-upload-pack", "GET"), + Service::UploadPack => ("upload-pack", "/git-upload-pack", "POST"), Service::ReceivePackLs => { ("receive-pack", "/info/refs?service=git-receive-pack", "GET") } - Service::ReceivePack => { - ("receive-pack", "/git-receive-pack", "POST") - } + Service::ReceivePack => ("receive-pack", "/git-receive-pack", "POST"), }; info!("action {} {}", service, path); Ok(Box::new(CurlSubtransport { @@ -131,21 +126,19 @@ } impl CurlSubtransport { - fn err>>(&self, err: E) -> io::Error { + fn err>>(&self, err: E) -> io::Error { io::Error::new(io::ErrorKind::Other, err) } fn execute(&mut self, data: &[u8]) -> io::Result<()> { if self.sent_request { - return Err(self.err("already sent HTTP request")) + return Err(self.err("already sent HTTP request")); } let agent = format!("git/1.0 (git2-curl {})", env!("CARGO_PKG_VERSION")); // Parse our input URL to figure out the host let url = format!("{}{}", self.base_url.lock().unwrap(), self.url_path); - let parsed = try!(Url::parse(&url).map_err(|_| { - self.err("invalid url, failed to parse") - })); + let parsed = Url::parse(&url).map_err(|_| self.err("invalid url, failed to parse"))?; let host = match parsed.host_str() { Some(host) => host, None => return Err(self.err("invalid url, did not have a host")), @@ -154,30 +147,34 @@ // Prep the request debug!("request to {}", url); let mut h = self.handle.lock().unwrap(); - try!(h.url(&url)); - try!(h.useragent(&agent)); - try!(h.follow_location(true)); + h.url(&url)?; + h.useragent(&agent)?; + h.follow_location(true)?; match self.method { - "GET" => try!(h.get(true)), - "PUT" => try!(h.put(true)), - "POST" => try!(h.post(true)), - other => try!(h.custom_request(other)), + "GET" => h.get(true)?, + "PUT" => h.put(true)?, + "POST" => h.post(true)?, + other => h.custom_request(other)?, } let mut headers = List::new(); - try!(headers.append(&format!("Host: {}", host))); + headers.append(&format!("Host: {}", host))?; if data.len() > 0 { - try!(h.post_fields_copy(data)); - try!(headers.append(&format!("Accept: application/x-git-{}-result", - self.service))); - try!(headers.append(&format!("Content-Type: \ - application/x-git-{}-request", - self.service))); + h.post_fields_copy(data)?; + headers.append(&format!( + "Accept: application/x-git-{}-result", + self.service + ))?; + headers.append(&format!( + "Content-Type: \ + application/x-git-{}-request", + self.service + ))?; } else { - try!(headers.append("Accept: */*")); + headers.append("Accept: */*")?; } - try!(headers.append("Expect:")); - try!(h.http_headers(headers)); + headers.append("Expect:")?; + h.http_headers(headers)?; let mut content_type = None; let mut data = Vec::new(); @@ -185,7 +182,7 @@ let mut h = h.transfer(); // Look for the Content-Type header - try!(h.header_function(|header| { + h.header_function(|header| { let header = match str::from_utf8(header) { Ok(s) => s, Err(..) => return true, @@ -201,41 +198,53 @@ } true - })); + })?; // Collect the request's response in-memory - try!(h.write_function(|buf| { + h.write_function(|buf| { data.extend_from_slice(buf); Ok(buf.len()) - })); + })?; // Send the request - try!(h.perform()); + h.perform()?; } - let code = try!(h.response_code()); + let code = h.response_code()?; if code != 200 { - return Err(self.err(&format!("failed to receive HTTP 200 response: \ - got {}", code)[..])) + return Err(self.err( + &format!( + "failed to receive HTTP 200 response: \ + got {}", + code + )[..], + )); } // Check returned headers let expected = match self.method { - "GET" => format!("application/x-git-{}-advertisement", - self.service), + "GET" => format!("application/x-git-{}-advertisement", self.service), _ => format!("application/x-git-{}-result", self.service), }; match content_type { Some(ref content_type) if *content_type != expected => { - return Err(self.err(&format!("expected a Content-Type header \ - with `{}` but found `{}`", - expected, content_type)[..])) + return Err(self.err( + &format!( + "expected a Content-Type header \ + with `{}` but found `{}`", + expected, content_type + )[..], + )) } Some(..) => {} None => { - return Err(self.err(&format!("expected a Content-Type header \ - with `{}` but didn't find one", - expected)[..])) + return Err(self.err( + &format!( + "expected a Content-Type header \ + with `{}` but didn't find one", + expected + )[..], + )) } } @@ -263,7 +272,7 @@ impl Read for CurlSubtransport { fn read(&mut self, buf: &mut [u8]) -> io::Result { if self.reader.is_none() { - try!(self.execute(&[])); + self.execute(&[])?; } self.reader.as_mut().unwrap().read(buf) } @@ -272,9 +281,11 @@ impl Write for CurlSubtransport { fn write(&mut self, data: &[u8]) -> io::Result { if self.reader.is_none() { - try!(self.execute(data)); + self.execute(data)?; } Ok(data.len()) } - fn flush(&mut self) -> io::Result<()> { Ok(()) } + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } } diff -Nru rust-git2-curl-0.9.0/tests/all.rs rust-git2-curl-0.12.0/tests/all.rs --- rust-git2-curl-0.9.0/tests/all.rs 2018-07-05 22:14:50.000000000 +0000 +++ rust-git2-curl-0.12.0/tests/all.rs 2019-10-28 14:41:18.000000000 +0000 @@ -1,12 +1,5 @@ -extern crate conduit_git_http_backend as git_backend; -extern crate git2_curl; -extern crate civet; -extern crate conduit; -extern crate curl; -extern crate git2; -extern crate tempfile; - -use civet::{Server, Config}; +use civet::{Config, Server}; +use conduit_git_http_backend as git_backend; use std::fs::File; use std::path::Path; use tempfile::TempDir; @@ -34,15 +27,20 @@ index.add_path(Path::new("foo")).unwrap(); index.write().unwrap(); let tree_id = index.write_tree().unwrap(); - r1.commit(Some("HEAD"), &sig, &sig, "test", - &r1.find_tree(tree_id).unwrap(), - &[]).unwrap(); + r1.commit( + Some("HEAD"), + &sig, + &sig, + "test", + &r1.find_tree(tree_id).unwrap(), + &[], + ) + .unwrap(); } // Clone through the git-http-backend let td2 = TempDir::new().unwrap(); - let r = git2::Repository::clone(&format!("http://localhost:{}", PORT), - td2.path()).unwrap(); + let r = git2::Repository::clone(&format!("http://localhost:{}", PORT), td2.path()).unwrap(); assert!(File::open(&td2.path().join("foo")).is_ok()); { File::create(&td.path().join("bar")).unwrap(); @@ -52,17 +50,25 @@ let tree_id = index.write_tree().unwrap(); let parent = r1.head().ok().and_then(|h| h.target()).unwrap(); let parent = r1.find_commit(parent).unwrap(); - r1.commit(Some("HEAD"), &sig, &sig, "test", - &r1.find_tree(tree_id).unwrap(), - &[&parent]).unwrap(); + r1.commit( + Some("HEAD"), + &sig, + &sig, + "test", + &r1.find_tree(tree_id).unwrap(), + &[&parent], + ) + .unwrap(); } let mut remote = r.find_remote("origin").unwrap(); - remote.fetch(&["refs/heads/*:refs/heads/*"], None, None).unwrap(); + remote + .fetch(&["refs/heads/*:refs/heads/*"], None, None) + .unwrap(); let b = r.find_branch("master", git2::BranchType::Local).unwrap(); let id = b.get().target().unwrap(); let obj = r.find_object(id, None).unwrap(); - r.reset(&obj, git2::ResetType::Hard, None).unwrap();; + r.reset(&obj, git2::ResetType::Hard, None).unwrap(); assert!(File::open(&td2.path().join("bar")).is_ok()); }