Skip to content

Commit f99a0da

Browse files
Elly Jonesgraydon
authored andcommitted
---
yaml --- r: 6646 b: refs/heads/master c: 0acf170 h: refs/heads/master v: v3
1 parent 11b07e0 commit f99a0da

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: b53e4e846399e2b6f0d656a5305a4af31e48b2e7
2+
refs/heads/master: 0acf170c9f9cd1c666a163657678ddec2366e0a3

trunk/src/cargo/cargo.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,17 @@ fn install_source(c: cargo, path: str) {
194194
}
195195
}
196196

197+
fn install_git(c: cargo, _path: str) {
198+
let wd = tempfile::mkdtemp(c.workdir + fs::path_sep(), "");
199+
alt wd {
200+
some(p) {
201+
run::run_program("git", ["clone", _path, p]);
202+
install_source(c, p);
203+
}
204+
_ { fail "needed temp dir"; }
205+
}
206+
}
207+
197208
fn install_file(c: cargo, _path: str) {
198209
let wd = tempfile::mkdtemp(c.workdir + fs::path_sep(), "");
199210
alt wd {
@@ -213,6 +224,9 @@ fn cmd_install(c: cargo, argv: [str]) {
213224
ret;
214225
}
215226

227+
if str::starts_with(argv[2], "git:") {
228+
install_git(c, argv[2]);
229+
}
216230
if str::starts_with(argv[2], "file:") {
217231
let path = rest(argv[2], 5u);
218232
install_file(c, path);

0 commit comments

Comments
 (0)