Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9bf2e45

Browse files
authored
Merge pull request alexcrichton#28 from alexcrichton/no-copy-git
Don't copy over .git directory to build dir
2 parents 4b4949f + 4b018c2 commit 9bf2e45

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,13 @@ fn cp_r(src: &Path, dst: &Path) {
331331
let f = f.unwrap();
332332
let path = f.path();
333333
let name = path.file_name().unwrap();
334+
335+
// Skip git metadata as it's been known to cause issues (#26) and
336+
// otherwise shouldn't be required
337+
if name.to_str() == Some(".git") {
338+
continue
339+
}
340+
334341
let dst = dst.join(name);
335342
if f.file_type().unwrap().is_dir() {
336343
fs::create_dir_all(&dst).unwrap();

0 commit comments

Comments
 (0)