Skip to content

Commit b4a875b

Browse files
committed
---
yaml --- r: 16086 b: refs/heads/try c: 7b36d66 h: refs/heads/master v: v3
1 parent a149f8b commit b4a875b

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 68e5d8daa39a6c61e5730b6daacaa4f608de95ed
5+
refs/heads/try: 7b36d66049e055306e96d912e9e8fb8fb1eda8ec
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/cargo/cargo.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,24 @@ fn cmd_install(c: cargo) unsafe {
713713
install_uuid(c, wd, uuid);
714714
}
715715
}
716+
} else if str::starts_with(target, "git:") {
717+
let ref = if c.opts.free.len() >= 4u {
718+
some(c.opts.free[3u])
719+
} else {
720+
none
721+
};
722+
install_git(c, wd, target, ref)
723+
} else if target == "git" {
724+
if c.opts.free.len() < 4u {
725+
fail #fmt("needed git url");
726+
}
727+
let url = c.opts.free[3u];
728+
let ref = if c.opts.free.len() >= 5u {
729+
some(c.opts.free[4u])
730+
} else {
731+
none
732+
};
733+
install_git(c, wd, url, ref)
716734
} else {
717735
let mut name = target;
718736
alt str::find_char(name, '/') {
@@ -891,6 +909,8 @@ Querying:
891909
Package installation:
892910
[options] [source/]PKGNAME Install a package by name
893911
[options] uuid:[source/]PKGUUID Install a package by uuid
912+
[options] git [url] [ref] Install a package by git
913+
[options] git://[url] [ref] Install a package by git
894914

895915
Package installation options:
896916
--mode=MODE Install to one of the following locations:

0 commit comments

Comments
 (0)